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'import requests
url = "https://app.simpledocs.com/api/oauth/token"
payload = {
"grant_type": "client_credentials",
"client_id": "<string>",
"client_secret": "<string>",
"scope": "read write"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: '<string>',
client_secret: '<string>',
scope: 'read write'
})
};
fetch('https://app.simpledocs.com/api/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access_token": "eyJhbGciOiJIUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 7200,
"scope": "read write",
"created_at": 1709654400
}{
"error": "invalid_client",
"error_description": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}Authentication
Create an access token
Exchange your client credentials for a Bearer access token. Tokens expire after 2 hours.
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'import requests
url = "https://app.simpledocs.com/api/oauth/token"
payload = {
"grant_type": "client_credentials",
"client_id": "<string>",
"client_secret": "<string>",
"scope": "read write"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: '<string>',
client_secret: '<string>',
scope: 'read write'
})
};
fetch('https://app.simpledocs.com/api/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access_token": "eyJhbGciOiJIUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 7200,
"scope": "read write",
"created_at": 1709654400
}{
"error": "invalid_client",
"error_description": "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
}Body
application/x-www-form-urlencoded
Must be client_credentials.
Available options:
client_credentials Your OAuth application UID.
Your OAuth application secret.
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"