Skip to content

Logout

The Logout operation terminates user session and disassociates the AuthenticatedUser role from the subsequent requests made by the client application.

Method

GET

URL

https://api.backendless.com/<application-id>/<REST-api-key>/users/logout

where

Argument                Description
<application-id> the ID of your application generated upon its creation. You can obtain the value in the Manage > App Settings section of the Backendless Console.
<REST-api-key> REST API key of your application. You can obtain the value in the Manage > App Settings section of the Backendless Console.

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

curl   
  -H user-token:[`value-of-user-token-from-login`](users_login.md#response-body)  
  -v   
  https://api.backendless.com/application-id/rest-api-key/users/logout