What you need
- Client ID
- Client Secret
- The stage you’re targeting: Testing or Production
- The cell you’re targeting (e.g.,
eu-1,us-1,ca-1,ap-2,ap-3)
Choose your Token URL
Use the Token URL that matches your stage + cell.| Stage | Cell | AWS Region | Token URL |
|---|---|---|---|
| Prod | eu-1 | eu-west-1 (Ireland) | https://eu.id.resistant.ai/oauth2/aus2un1hkrKhPjir4417/v1/token |
| Prod | us-1 | us-east-1 (N. Virginia) | https://eu.id.resistant.ai/oauth2/aus3tzuy12e5blAJi417/v1/token |
| Prod | ca-1 | ca-central-1 (Canada) | https://eu.id.resistant.ai/oauth2/ausd6inbxjwgeJfq4417/v1/token |
| Prod | ap-2 | ap-south-1 (Mumbai) | https://eu.id.resistant.ai/oauth2/aus827qzu1l953dI4417/v1/token |
| Prod | ap-3 | ap-southeast-2 (Sydney) | https://eu.id.resistant.ai/oauth2/ausp40dse1Q0rzDq6417/v1/token |
| Test | eu-1 | eu-west-1 (Ireland) | https://eu.id.resistant.ai/oauth2/aus17c52xbW6c0yA9417/v1/token |
Brief introduction to OAuth 2.0 (client credentials)
OAuth 2.0 is an authorization protocol used to obtain an access token that your application can use to call an API without sending user credentials on every request. For the Resistant Documents API, you’ll use the Client Credentials flow:- Your service is provisioned with a Client ID and Client Secret
- You exchange them for a short-lived access token
- You use that token in
Authorization: Bearer <token>for API calls
Token validity and expiration
Access tokens are time-limited. You should:- Reuse the same token for multiple API calls until it expires
- Request a new token only when needed (to avoid unnecessary token issuance)
- The
expires_infield returned by the token endpoint (recommended and always available)
iat and exp.
Example JWT payload fields (illustrative):
How to use the token
Include the access token in theAuthorization header of Documents API requests:
Token request details
HTTP request- Method:
POST - Headers:
Authorization: Basic <base64(client_id:client_secret)>Content-Type: application/x-www-form-urlencodedAccept: application/json
- Body (form-urlencoded):
grant_type=client_credentialsscope=submissions.read submissions.write
Scopes
Use these scopes when requesting a token:submissions.read— read analysis resultssubmissions.write— create submissions (and other write actions)