Sign out with a refresh token
End a terminal sign-in, both its tokens at once
POST/v1/cli/tokens/revoke
Ends the sign-in a refresh token belongs to, both its tokens at once. Any
refresh token the sign-in was answered ends it. There is no bearer, and the
route reads no x-mapier-version. The answer is always a 204, for an unknown
token too, so it says nothing about the token.
Use it once the access token has expired. While the access token is live,
POST /v1/personal-tokens/current/revoke
does the same.
Example request
curl -X POST https://api.mapier.ai/v1/cli/tokens/revoke \
-H "Content-Type: application/json" \
-d '{ "refreshToken": "mp_refresh_example-not-a-real-token" }'Response
204 No Content, with no body.
Errors
| Status | Code | Reason | When | Channels |
|---|---|---|---|---|
| 400 | bad_request | The body is not valid JSON, the channel rejected the request as malformed, or a header the call needs is missing. | All | |
| 413 | payload_too_large | The body is over 65,536 bytes. | All | |
| 422 | validation_failed | A field is wrong, and details names each one at its path. | All | |
| 429 | rate_limited | Too many requests for this route's budget. | All | |
| 500 | internal_error | Mapier failed on its side, and has been alerted. | All | |
| 503 | upstream_unavailable | The channel did not take the command, or gave no answer Mapier could use. | All |