The RC API Client supports two authentication methods: Bearer token authentication and Basic authentication.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/roobscoob/rcvcf/llms.txt
Use this file to discover all available pages before exploring further.
Authentication Enum
TheAuthentication enum defines the supported authentication methods:
src/rc_api.rs:355-372
Variants
Authentication method for API requests.
Bearer Token Authentication
Bearer token authentication is the recommended method for most use cases. You can obtain a personal access token from your RC settings.Creating a Client with Bearer Token
Real-World Example
From the RC VCF Generator:src/main.rs:323-326
Basic Authentication
Basic authentication uses your RC email and password. This method is required for certain operations like creating tokens.Creating a Client with Basic Auth
Base64 Encoding
The client automatically encodes your credentials to base64 format:Basic authentication credentials are base64-encoded automatically. You don’t need to encode them yourself.
When to Use Each Method
- Bearer Token
- Basic Auth
Use Bearer token authentication when:
- You have a personal access token
- You’re building a production application
- You want to avoid hardcoding passwords
- You’re accessing read-only data (profiles, batches, etc.)
- More secure (can be revoked without changing password)
- Can be scoped to specific permissions
- Recommended for most use cases
Authorization Header
The client automatically adds theAuthorization header to all requests:
src/rc_api.rs:416-423
Header Format
Security Best Practices
Using Environment Variables
Create a.env file:
.env
.gitignore
Make sure to ignore your.env file:
.gitignore
Testing Authentication
You can test your authentication by callingget_my_profile():
Next Steps
Create Tokens
Learn how to create personal access tokens
Error Handling
Handle authentication errors
Profiles API
Start using the authenticated client