Creating a Token
1
Sign In
Sign in to your Raydocs account at raydocs.com.
2
Open Settings
Click on your profile icon and select Settings, then navigate to Access Tokens.
3
Create New Token
Click Create new token and enter a descriptive name (e.g., “Production Integration”).
4
Select Abilities
Choose the abilities (scopes) you want to grant to this token.
5
Copy Token
Click Create and copy the token value immediately.
Abilities
Abilities control what operations a token can perform:| Ability | Grants |
|---|---|
workspaces-read | List workspaces |
workspaces-write | Create, update or delete workspaces |
workspace-users-read | List members and invites |
workspace-users-write | Manage members and invites |
templates-read | List and view extraction templates |
templates-write | Create, update, or delete templates |
sessions-read | List sessions, documents, and results |
sessions-write | Create sessions, upload documents, run extractions |
Using the Token
Send the token in theAuthorization header with every API request:
Example
Revoking a Token
If a token is leaked or no longer needed:1
Go to Settings
Navigate to Settings → Access Tokens.
2
Find Token
Locate the token you want to revoke in the list.
3
Revoke
Click Revoke next to the token.
401 Unauthorized.
Best Practices
Secure Storage
Secure Storage
Store tokens in environment variables, secret managers (AWS Secrets Manager, HashiCorp Vault), or CI/CD secrets. Never hardcode tokens in source code.
One Token Per Integration
One Token Per Integration
Create a dedicated token for each integration or service. This makes it easy to revoke access for a single integration without affecting others.
Avoid Version Control
Avoid Version Control
Never commit tokens to Git or other version control systems. Add token files to
.gitignore and use secret scanning tools.Regular Rotation
Regular Rotation
Rotate tokens periodically, especially for production integrations. Create a new token, update your integration, then revoke the old token.
Minimal Scope
Minimal Scope
Only grant the abilities your integration actually needs. A read-only dashboard integration shouldn’t have write permissions.
Token Format
Raydocs tokens follow this format:rd_- Raydocs prefix{environment}-livefor production,testfor sandbox{random_string}- Unique identifier
rd_live_abc123xyz789def456
Troubleshooting
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Possible causes:
- Token lacks required ability for the endpoint
- Attempting to access a resource in another workspace
