We are sunsetting On-Premises API. Refer to our On-Premises API Sunset document for details, and to learn how to migrate to our next-generation Cloud API.

Logout

/v1/users/logout

Use the /v1/users/logout endpoint to logout of the WhatsApp Business API Client. Logging out revokes the authentication token.

Before You Start

  • Logging out of the WhatsApp Business API Client explicitly revokes the authentication token sent with the request. Any other tokens associated with the same username remain valid.
  • If you want to log a user out or revoke the user's token, use the DELETE /v1/users endpoint instead. This action deletes the user from the system.

Creating

A user can create a logout request by making a POST call to this endpoint.

Example

POST /v1/users/logout
Authorization: Bearer your-auth-token

The response to the logout request contains a meta object in response body.

HTTP Response CodeResult

200 OK

Success — The request was validated and the user is logged out of the account.

401 Unauthorized

Error — The request was not validated and the user is not logged out of the account. An error code and information will present possible reasons for the error, such as invalid credentials.

Errors

If there are errors in the response, refer to the following sources for more information: