Generate token
curl --request POST \
--url https://dev.api.withconvexity.com/v1/oauth/token \
--header 'Content-Type: application/json' \
--data '
{
"grant_type": "client_credentials",
"client_secret": "{{clientSecret}}",
"scope": ""
}
'import requests
url = "https://dev.api.withconvexity.com/v1/oauth/token"
payload = {
"grant_type": "client_credentials",
"client_secret": "{{clientSecret}}",
"scope": ""
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({grant_type: 'client_credentials', client_secret: '{{clientSecret}}', scope: ''})
};
fetch('https://dev.api.withconvexity.com/v1/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access_token": "",
"token_type": "Bearer",
"expires_in": 600,
"scope": "payments:read"
}{
"error": "invalid_request",
"error_description": "Invalid literal value, expected \"client_credentials\""
}{
"error": "invalid_client",
"error_description": "Missing API key. Use HTTP Basic auth or supply client_secret in the body."
}{
"error": "unauthorized_client",
"error_description": "This API key is not permitted to request the 'payments' audience"
}{
"status": false,
"message": "Too many requests. Please try again later.",
"retryAfter": 42
}{
"error": "server_error",
"error_description": "An unexpected error occurred"
}{
"error": "temporarily_unavailable",
"error_description": "The authorization server is temporarily unable to handle the request"
}Auth-Edge
Generate token
Exchange a project API key for a short-lived OAuth 2.0 bearer token using the client_credentials grant. No Authorization header is required; supply the API key as client_secret in the request body.
POST
/
v1
/
oauth
/
token
Generate token
curl --request POST \
--url https://dev.api.withconvexity.com/v1/oauth/token \
--header 'Content-Type: application/json' \
--data '
{
"grant_type": "client_credentials",
"client_secret": "{{clientSecret}}",
"scope": ""
}
'import requests
url = "https://dev.api.withconvexity.com/v1/oauth/token"
payload = {
"grant_type": "client_credentials",
"client_secret": "{{clientSecret}}",
"scope": ""
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({grant_type: 'client_credentials', client_secret: '{{clientSecret}}', scope: ''})
};
fetch('https://dev.api.withconvexity.com/v1/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access_token": "",
"token_type": "Bearer",
"expires_in": 600,
"scope": "payments:read"
}{
"error": "invalid_request",
"error_description": "Invalid literal value, expected \"client_credentials\""
}{
"error": "invalid_client",
"error_description": "Missing API key. Use HTTP Basic auth or supply client_secret in the body."
}{
"error": "unauthorized_client",
"error_description": "This API key is not permitted to request the 'payments' audience"
}{
"status": false,
"message": "Too many requests. Please try again later.",
"retryAfter": 42
}{
"error": "server_error",
"error_description": "An unexpected error occurred"
}{
"error": "temporarily_unavailable",
"error_description": "The authorization server is temporarily unable to handle the request"
}⌘I
