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.
Name | Type | Description |
---|---|---|
accessToken | string | The new access token to be used by the Chat API |
expiration | integer | The expiration timestamp of the provided access token. Example: 1503570990 |
This method has no optional parameters.
This method does not return any values.
chatbot.api.setAccessToken(accessToken, expiration);