Logout User
Deactivate a session token retrieved from loginUser.
POST https://instance.securid.com/aveksa/command.submit?cmd=logoutUser
Request
Parameters
logoutUser | |
format | properties - (Default) key=value . most useful when requesting a single object. If multiple objects are returned, values is a csv. ie key=value1,value2,value3 where value1 is the value for the first object, value2 is the value for the 2nd object, etc.json - Useful format for parsing into javascript or other languages. See www.json.org for details. |
Headers
Bearer token | |
Accept | application/json |
Content-Type | application/json |
Response
Parameters
type | Executed command name |
Examples
Request
- Curl
- Python
- Node.js
curl --location --request POST \
"https://instance.securid.com/aveksa/command.submit?cmd=logoutUser&format=json" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"
import requests, json
url = "https://instance.securid.com/aveksa/command.submit"
params = {
"cmd": "logoutUser",
"format": "json"
}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
response = requests.post(url, params=params, headers=headers)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code {response.status_code}")
const axios = require('axios');
const url = "https://instance.securid.com/aveksa/command.submit";
const params = {
cmd: "logoutUser",
format: "json"
};
const headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
};
axios.post(url, null, { params, headers })
.then(response => {
if (response.status === 200) {
const data = response.data;
console.log(data);
} else {
console.log(`Request failed with status code ${response.status}`);
}
})
.catch(error => {
console.error('Error:', error);
});
Response
- 200
- 401
{
"data": {
"type": "logoutUser"
}
}
<html>
<head>
<title>Error</title>
</head>
<body>The token is not valid for the command 'logoutUser'. Token is invalid or expired</body>
</html>