FAQ API
BETA
How do I get an API access authorization token?
the Sage Active Public API V0 is secured by Oauth 2.0 authentication.
The example of obtaining a token is explained:
What rights are needed to call the API?
To have the right to call the APIs, the user must meet the following conditions:
- The user is a Sage Active user.
- User must be activated.
Error: Access denied due to invalid subscription key.
If this error occurs when using Sage Active Public API V0:
{
"statusCode": 401,
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
}
Check the following points :
-
With the sample postman collection :
Check that the subscriptionKey variable is the correct Subscription primary key or Subscription secondary key in your application. -
With your implementation or from Postman without the example collection :
Check in the Header of your request ifx-api-key
is filled in with the correct Subscription primary key or Subscription secondary key in your application.
If this error occurs when using Sage Active Public API V0
{
"statusCode": 401,
"message": "JWT not present."
}
Check the following points :
-
With the sample postman collection :
Check that the accessToken variable is filled in with a valid access token. -
With your implementation or from Postman without the example collection :
Check in the Header of your request ifAuthorization
is filled in with the correct Bearer [access token] retrieved from the authentication of the current user.
If this error occurs when using Sage Active Public API V0
{
"Message": "Bad Request",
"Code": null,
"Path": null,
"Locations": null,
"Extensions": null,
"Exception": null,
"SyntaxNode": null
}
Check the following points :
- With the sample postman collection :
- Check that the X-TenantId variable is filled in with a valid tenant Id retrieved with currentSubscription.
- Check that the X-OrganizationId variable is filled in with a valid Organization Id retrieved with organizations
- With your implementation or from Postman without the example collection :
- Check in the Header of your request if
X-TenantId
is filled in with a valid tenant Id retrieved with currentSubscription. - Check in the Header of your request if
X-OrganizationId
is filled in with a valid Organization Id retrieved with organizations
- Check in the Header of your request if