Use this method to set accessToken
and expiration
:
client.setAccessToken(accessToken:String, expiration:String);
Name | Type | Description |
---|---|---|
accessToken | string | Access token to be set. |
expiration | string | Expiration date of the token. |
This method does not have any options.
This method returns only an HTML code and message to communicate that an access token has been successfully set for the relevant API client.
This example refreshes an accessToken and then sets the new one.
client.refreshAccessToken().then(function(response){
client.setAccessToken(response.accessToken, response.expiration);
});