Logout
Logging out terminates the current session, and invalidates the auth_token. The user will have to login again after this.
Sample code¶
curl --location 'https://easeapi.venturasecurities.com/user/v1/logout' \
--header 'x-app-key: 8ab5rt7yp2lm9qw4s1ex' \
--header 'x-client-id: AA0605' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...' \
--data '{
"refresh_token": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVA..."
}'
import requests
import json
url = "https://easeapi.venturasecurities.com/user/v1/logout"
payload = json.dumps({
"refresh_token": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVA..."
})
headers = {
'x-app-key': '8ab5rt7yp2lm9qw4s1ex',
'x-client-id': 'AA0605',
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let data = JSON.stringify({
"refresh_token": "eyJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVA..."
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://easeapi.venturasecurities.com/user/v1/logout',
headers: {
'x-app-key': '8ab5rt7yp2lm9qw4s1ex',
'x-client-id': 'AA0605',
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response¶
Request parameters¶
Parameter |
Description |
---|---|
refresh_token |
This refresh token was generated during Login. |
Response Parameter¶
Parameter |
Description |
---|---|
success |
Indicates the status of the logout was successfull true or not false |
message |
This is a message received when the logout request is successfully processed or if there was an error during the execution process, this message provides a reason for the failure |