In order to make calls with the Easypromos API, it is necessary to first obtain an Access Token that allows the programmer to obtain a valid response from the API call that was done. The access token is the security system provided by Easypromos to the API and allows:
- Uniquely identifying the Easypromos account that is making the call to the API
- Managing access permissions to the resource you wish to access via the API
- Controlling the frequency of calls to the account API
A token will no longer be valid if:
- It doesn’t have permissions to access the information of the attempted API call. One reason it may not have permissions is if it is trying to access the promotion information of an account that does not belong to the owner of the token.
- The token has expired. All tokens have an expiry date, after which the token is no longer valid.
- The token has been used to carry out calls to the API with too much frequency.
Obtaining the access token
Tokens are generated from the menu Settings > Integrations > Developers:
From this page, the user will be able to do the following:
- Create a new token. By default, it will have a 30-day duration.
- Extend a token’s duration to one year.
- Delete an existing token.
- Add a name to the token to easily identify it.
Currently, tokens have permission to access White Label promotions linked to the account that has created the token. The promotion information that the token has access to is defined in the API documentation.