client_id and client_secret for a short-lived Bearer token, then sends that token with every API request.
Prerequisites
You’ll need an OAuth application linked to your company. Your SimpleDocs administrator can create one from the admin panel or by contacting the SimpleDocs team. You will receive:- Client ID — your application’s public identifier
- Client Secret — a secret key (keep this safe, never expose it client-side)
Step 1: Request an access token
Make aPOST request to the token endpoint:
| Field | Description |
|---|---|
access_token | The Bearer token to use in requests. |
expires_in | Token lifetime in seconds (2 hours). |
scope | The granted scopes. |
Scopes
| Scope | Grants access to |
|---|---|
read | All GET endpoints. |
write | Create endpoints (POST) for documents, requests, and webhooks. |
read write | Both read and write access. |
scope if you only need read access and your OAuth application is scoped to read or write — it defaults to read. If your application has the read write scope, you must specify scope explicitly.
Step 2: Use the token
Include the token in theAuthorization header of every API request:
Token expiry and renewal
Tokens expire after 2 hours (7200 seconds). When a token expires, the API returns:Best practices
- Cache tokens until they are close to expiring, rather than requesting a new token for every API call.
- Store credentials securely — never embed your client secret in client-side code, mobile apps, or public repositories.
- Request only the scopes you need — if your integration only reads data, omit the
writescope.
Error responses
| Status | Type | Meaning |
|---|---|---|
| 401 | token_expired | The token has expired. Request a new one. |
| 401 | invalid_client | The client ID or secret is incorrect. |
| 403 | insufficient_scope | The token doesn’t have the required scope for this endpoint. |