Skip to content

Delete Access Token

Request URL

DELETE /token

Description

Disables the token so it can no longer be used.

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'DELETE',
  url: '${AMPLIFI_BASE_URL}/token',
  headers: {
    'Content-Type': "application/json"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/token"  --header "Content-Type: application/json" 

Successful Response Examples

200 TOKEN SUCCESSFUL RESPONSE LOGOUT

HEADERS

Header Value
Content-Type application/json

REQUEST BODY

none

RESPONSE BODY

{
    "success": true,
    "text": "Logged out successfully"
}