You need to request a valid token for your API calls using your consumer and secret keys
Confirm your authorisation to access data through the API by requesting a token.
Returns authorisation token and ClientID.
Call
https://app.avasam.com/api/auth/request-token
When using the Avasam API, remember that it must be called correctly, using the appropriate method (such as POST) described in this article, and with a valid token. Otherwise the server may return an error.
Parameters
The header details for this call are as follows:
Field name |
Type |
Description |
Is Required |
Consumer_key |
string |
Requested from user management in Avasam |
True |
secret_key |
string |
Requested from user management in Avasam |
True |
Request body
You must first get a consumer key and secret key from your seller account first.
The call is structured as follows:
{
"consumer_key":string,
"secret_key":string
}
Response
Field |
Type |
Description |
Notes |
---|---|---|---|
access_token |
String |
Access token for API calls |
Essential for seller API calls to the account |
expires_at |
String |
Time and date to request new token |
Response body
The response from Avasam will come in the following form:
{
"access_token": "1111111-1111-1111-1111-111111111111",
"expires_at": "2021-12-22T17:36:19.8066912+00:00"
}
Tips
- Store the ‘access_token’ value separately for repeated use in other calls until it expires.
- Store the "expires_at" value to ensure that you can request a new token when the current one expires.
- Authentication calls are not counted against your API rate limit.