Skip to main content

"deleteSession"

JSON ADMIN "deleteSession" disconnects a client from Remote Procedure Call service

The "deleteSession" action disconnects the client and closes the server-side resources the client is consuming. It requires a valid "authToken" from the "createSession" action.

Transactions that are not committed, are automatically rolled back.

Tip

Use "deleteSession" to remove a permanent session.

Request examples

Minimal request

{
  "authToken": "replaceWithValidAuthtoken",
  "api": "admin",
  "action": "deleteSession"
}
{
  "requestId": "2",
  "authToken": "replaceWithValidAuthtoken",
  "api": "admin",
  "action": "deleteSession",
  "params": {},
  "responseOptions": {},
  "apiVersion": "1.0",
  "debug": "max"
}
{
  "authToken": "replaceWithValidAuthtoken",
  "result": {},
  "debugInfo": {
    "request": {
      "authToken": "replaceWithValidAuthtoken",
      "api": "admin",
      "action": "deleteSession",
      "debug": "max"
    }
  },
  "errorCode": 0,
  "errorMessage": ""
}
{
  "authToken": "anInvalidAuthorizationToken",
  "requestId": "2",
  "debugInfo": {
    "request": {
      "authToken": "anInvalidAuthorizationToken",
      "action": "deleteSession",
      "requestId": "1"
    }
  },
  "errorCode": 12031,
  "errorMessage": "'authToken' does not match any existing session. Use a valid 'authToken' or use 'createSession' to create a valid 'authToken'."
}

Use the deleteSession API action to disconnect the client from the RPC service and close the server-side resources the client is consuming

API actionsJSON ADMIN APIjsonActionadmin sessiondeleteSessiondeleteSessionsdeletesSessiondeletesSessionsdelete session