Remove an agent's access
OpenAPI JSONDELETE
/v1/me/access-tokens/{id}
const url = 'https://api.eu.apigami.com/v1/me/access-tokens/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.eu.apigami.com/v1/me/access-tokens/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Ends the agent token at once: its next request is a 401. What it created stays.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Responses
Section titled “Responses”Revoked.
An agent token or an OAuth token.
Media typeapplication/json
object
error
required
string
consentPending
Present and true when the approval window is open and the user has not answered within 45 s.
boolean
Example
{ "error": "an agent token cannot administer the account; ask the user to do it in the dashboard"}Not a live agent token of this account.
Media typeapplication/json
object
error
required
string
consentPending
Present and true when the approval window is open and the user has not answered within 45 s.
boolean
Example
{ "error": "not found"}