Due to the access token retrieved during the login
process expiring, it is possible that it will need to be renewed during a conversation.
Renewing the Access Token
Token expiration can be identified by a 401 Unauthorized
status with the following response body:
{
"error": "Access credentials were not supplied."
}
If you receive this response, a request should be made to the login
endpoint, ensuring the same id
is passed.
Once a new access token is granted, this can be used for future requests to the chat
endpoint.
Continuing a conversation
To continue the conversation during which the access token expired, simply pass the existing conversation.id
in the request, along with the new access token in the Authorization
header.