/v1/users/logout endpoint to logout of the WhatsApp Business API Client. Logging out revokes the authentication token.
If you want to log a user out or revoke the user's token, use the DELETE /v1/users endpoint instead. Note: This action deletes the user from the system.
The request for logging out a user account, by a user, looks like this:
POST /v1/users/logout Authorization: Bearer your-auth-token
Logging out of the WhatsApp Business API Client will explicitly revoke the authentication token sent with the request. Any other tokens associated with the same username remain valid.
Note: Generating an authentication token is discussed in Login and Authentication.
The response to the logout request will contain a
meta object in response body.
|HTTP Response Code||Result|
Success — The request was validated and the user is logged out of the account.
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.
If there are errors in the response, refer to the following sources for more information: