Developers

SetAccessToken

Usage

Use this method to set a new authClient expiration time and accessToken. It updates the clientAxios accessToken. This is useful if the API authorization is performed on your server side because it allows you to set a new access token when an unauthorized request has been made.

Mandatory parameters

Name Type Description
accessToken string The new access token to be used by the Chatbot API
expiration integer The expiration timestamp of the provided access token. Example: 1503570990

Optional parameters

This method has no optional parameters.

Response data format

This method does not return any values.

Example

chatbot.api.setAccessToken(accessToken, expiration);