Skip to main content
Create an access token
curl --request POST \
  --url https://app.simpledocs.com/api/oauth/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data 'client_id=<string>' \
  --data 'client_secret=<string>' \
  --data 'scope=read write'
{
  "access_token": "eyJhbGciOiJIUzI1NiJ9...",
  "token_type": "Bearer",
  "expires_in": 7200,
  "scope": "read write",
  "created_at": 1709654400
}

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required

Must be client_credentials.

Available options:
client_credentials
client_id
string
required

Your OAuth application UID.

client_secret
string
required

Your OAuth application secret.

scope
string

Space-separated list of scopes. Available: read, write, read write. Can be omitted if you only need read access and your OAuth application is scoped to read or write — defaults to read. Required when scoped to read write.

Example:

"read write"

Response

Token created successfully.

access_token
string
Example:

"eyJhbGciOiJIUzI1NiJ9..."

token_type
string
Example:

"Bearer"

expires_in
integer

Token lifetime in seconds.

Example:

7200

scope
string
Example:

"read write"

created_at
integer
Example:

1709654400