Revoke authorization¶
Revoke your authorization token
- HTTP Method:
DELETE - URL:
https://example.domain.tld/api/v1/auth/ - Require authentication:
Yes - Permission level required:
MasterAdmin/DomainAdmin/MailUser
Response parameters¶
| Parameter | Type | Description |
|---|---|---|
| auth | dict | The authentication status object |
| username | str | Your account username |
| status | str | Authentication status |
| message | str | Authentication status description |
Example request (Python)¶
import requests
import json
from pprint import pprint
url = "https://example.domain.tld/api/v1/auth/"
r = requests.delete(url, auth=("admin","long-auth_token-here"))
try:
pprint(r.json())
except:
print(r.text)
Example request (curl)¶
curl -X DELETE https://example.domain.tld/api/v1/auth/ -u "admin:long-auth_token-here"
Example response (JSON)¶
{'auth': {'message': 'Authorization revoked',
'status': 'revoked',
'username': 'admin'}}