Auth API reference

Auth API · Consumer-Auth

post/{app_slug}/v1/auth/logout

Revoke a refresh token

Destroys the session that owns the refresh token. The matching access token continues to verify until its TTL expires.

Path parameters

app_slug*string

Slug of the app.

Request body

refresh_token*string

Refresh token to revoke. The matching session is destroyed; the access token continues to verify until its TTL expires.

Example: "eyJhbGciOiJSUzI1NiIsImtpZCI6ImsxIn0.eyJ0eXAiOiJyZWZyZXNoIn0.c2lnbmF0dXJl"

Response · 204

Session revoked.

Example

Request

POST https://api.auth.productcraft.co/{app_slug}/v1/auth/logout
Content-Type: application/json

{
  "refresh_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImsxIn0.eyJ0eXAiOiJyZWZyZXNoIn0.c2lnbmF0dXJl"
}