MagicWP Docs
API tokens

The API token making this request: name, expiry, limits and permissions

GET
/v1/tokens/current

Permission: any member

Authorization

apiToken
headerAuthorizationBearer <token>

An API token (mwp_…) from Settings → API tokens. Only accepted on this host.

Response Body

Successful Response

application/json
  1. response
success*boolean
data*

The result; on an error, details such as code and permission.

message*string
status_code*integer
timestamp*string
Formatdate-time
meta?|null
curl -X GET "https://example.com/v1/tokens/current"
{  "message": "string",  "status_code": 0,  "timestamp": "2019-08-24T14:15:22Z",  "meta": {},  "success": true,  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "prefix": "string",    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",    "workspace_name": "string",    "permissions": [      "string"    ],    "ip_allowlist": null,    "expires_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "last_used_at": null,    "last_used_ip": null,    "revoked_at": null,    "role": "string",    "effective_permissions": [      "string"    ]  }}