Throw an UnauthorizedError in an intent handler that requires an access token if the token is
invalid. This triggers an access token refresh request for the Action from the Assistant.
example
constapp = conversation()app.handle('My_Handler_Name_That_Requires_An_Access_Token', conv=> {// ...// given a function to check if an access token is still validconstvalid = isTokenValid(conv.user.params.bearerToken)if (!valid) {thrownewUnauthorizedError() }})
Throw an UnauthorizedError in an intent handler that requires an access token if the token is invalid. This triggers an access token refresh request for the Action from the Assistant.