Personal access tokens
Set up
Section titled “Set up”npm install @limitry/sdkimport { createClient } from "@limitry/sdk";
const limitry = createClient(); // reads LIMITRY_API_KEYpip install limitryfrom limitry import Limitry
limitry = Limitry() # reads LIMITRY_API_KEYnpm install -g @limitry/clilimitry loginexport LIMITRY_API_KEY="lim_test_…"Get the current user
Section titled “Get the current user”GET /v1/user/me
Returns the user the personal access token belongs to, with their workspace memberships.
await limitry.user.me();limitry.user.me()limitry user mecurl -X GET "https://api.limitry.com/v1/user/me" \ -H "Authorization: Bearer $LIMITRY_API_KEY"More about this endpoint
Useful as an integration smoke test (“who am I?”).
Revoke the token making this request
Section titled “Revoke the token making this request”DELETE /v1/user/token
Revokes the personal access token used to call it — signing out from a script or the CLI (logout).
await limitry.user.revokeToken();limitry.user.revoke_token()limitry user revoke-token --yescurl -X DELETE "https://api.limitry.com/v1/user/token" \ -H "Authorization: Bearer $LIMITRY_API_KEY"More about this endpoint
The token stops working immediately; other tokens are untouched.