Sign a device out

.md

End another device's token from this one.

Scopesme:write
DELETE/v1/me/sessions/{id}

Ends one device's token immediately. Its next request answers 401 with revoked_token, whatever it was in the middle of.

Only your own devices. An id belonging to somebody else returns 404, the same as an id that does not exist.

Request

curl -X DELETE https://api.proppertrading.com/v1/me/sessions/9f2c1a44 \
  -H "Authorization: Bearer ptat_a1b2c3d4_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f"

Response

204, no body.

Signing out the device you are on

Allowed, and it works, but sign out is the endpoint for that: it needs no scope, and a client that has already lost its token cannot call this one.

Errors

StatusCodeMeaning
401invalid_tokenNot a token, or the secret does not match
403insufficient_scopeThis device does not hold me:write
404resource_not_foundNo such device is signed in to this account