Logout¶
The Logout operation terminates user session and disassociates the AuthenticatedUser
role from the subsequent requests made by the client application.
Method¶
GET
Endpoint URL¶
The xxxx.backendless.app
is a subdomain assigned to your application. For more information see the Client-side Setup section of this documentation.
https://xxxx.backendless.app/api/users/logout
Request Headers¶
user-token: value-of-the-user-token-header-from-login
where
Argument | Description |
---|---|
user-token |
A value returned by Backendless in the response for the preceding Login operation. The value identifies the user to be logged out. This header is mandatory. |
Errors¶
When the server-side reports an error, it returns a JSON object in the following format:
{
"message":error-message,
"code":error-code
}
The following errors may occur during the Logout API call.
Error Code |
Description |
---|---|
2002 |
Version is disabled or provided wrong application info (application id or secret key) |
3007 |
Invalid application-id or version. |
3023 |
General error while executing logout. Error details should be available in the message property. |
Example¶
Important
Make sure to replace xxxx in the domain name in the sample request below to the one assigned to your application.
curl
-H user-token:[`value-of-user-token-from-login`](users_login.md#response-body)
-v
https://xxxx.backendless.app/api/users/logout