Developers

SetAccessToken

Usage

Use this method to set accessToken and expiration:

client.setAccessToken(accessToken:String, expiration:String);

Mandatory parameters

Name Type Description
accessToken string Access token to be set.
expiration string Expiration date of the token.

Options

This method does not have any options.

Response data format

This method returns only an HTML code and message to communicate that an access token has been successfully set for the relevant API client.

Example

This example refreshes an accessToken and then sets the new one.

client.refreshAccessToken().then(function(response){
    client.setAccessToken(response.accessToken, response.expiration);
});