Get tokens
curl --request POST \
--url https://api.vegaminds.com/oauth/token \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=authorization_code \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data 'redirect_uri=<string>' \
--data 'client_id=<string>' \
--data 'client_secret=<string>'import requests
url = "https://api.vegaminds.com/oauth/token"
payload = {
"grant_type": "authorization_code",
"code": "<string>",
"code_verifier": "<string>",
"redirect_uri": "<string>",
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
grant_type: 'authorization_code',
code: '<string>',
code_verifier: '<string>',
redirect_uri: '<string>',
client_id: '<string>',
client_secret: '<string>'
})
};
fetch('https://api.vegaminds.com/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access_token": "ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "REFRESH_TOKEN",
"scope": "contacts:read notes:write"
}{
"error": "invalid_grant",
"error_description": "The refresh token is invalid, expired or revoked."
}{
"error": "invalid_client",
"error_description": "Client authentication failed: unknown client_id or wrong client_secret."
}Authorization
Get tokens
Exchanges an authorization code for tokens, or a refresh token for new tokens. Your application authenticates
with HTTP Basic, client_id as the user name and client_secret as the password, or with client_id and
client_secret in the form.
Each refresh retires the refresh token sent and returns a new one. A refresh repeated within 10 minutes is honored; a retired refresh token presented later ends the connection.
POST
/
token
Get tokens
curl --request POST \
--url https://api.vegaminds.com/oauth/token \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=authorization_code \
--data 'code=<string>' \
--data 'code_verifier=<string>' \
--data 'redirect_uri=<string>' \
--data 'client_id=<string>' \
--data 'client_secret=<string>'import requests
url = "https://api.vegaminds.com/oauth/token"
payload = {
"grant_type": "authorization_code",
"code": "<string>",
"code_verifier": "<string>",
"redirect_uri": "<string>",
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
grant_type: 'authorization_code',
code: '<string>',
code_verifier: '<string>',
redirect_uri: '<string>',
client_id: '<string>',
client_secret: '<string>'
})
};
fetch('https://api.vegaminds.com/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access_token": "ACCESS_TOKEN",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "REFRESH_TOKEN",
"scope": "contacts:read notes:write"
}{
"error": "invalid_grant",
"error_description": "The refresh token is invalid, expired or revoked."
}{
"error": "invalid_client",
"error_description": "Client authentication failed: unknown client_id or wrong client_secret."
}Authorizations
Body
application/x-www-form-urlencoded
- Authorization code
- Refresh token
Response
The tokens.

