Personal access tokens API
The personal access tokens endpoints, each in TypeScript, Python, the CLI and curl.
Set up
Section titled “Set up”This takes a personal access token, not an API key. In the SDKs, pass it as token.
npm install @reminix/sdkexport REMINIX_TOKEN="<your personal access token>"pip install reminixexport REMINIX_TOKEN="<your personal access token>"npm install -g @reminix/clireminix loginexport REMINIX_TOKEN="<your personal access token>"Get the current user
Section titled “Get the current user”GET /v1/user/me Try it in the API playground (opens in a new tab) Returns the user the personal access token belongs to, and their workspace memberships.
import { createClient } from "@reminix/sdk";
const reminix = createClient({ token: process.env.REMINIX_TOKEN });const me = await reminix.user.me();console.log(me);import os
from reminix import Reminix
reminix = Reminix(token=os.environ["REMINIX_TOKEN"])me = reminix.user.me()print(me)reminix user mecurl -X GET "https://api.reminix.com/v1/user/me" \ -H "Authorization: Bearer $REMINIX_TOKEN"Returns:
{ "id": "usr_4f8a2c1e-7b3d-4e9f-a6c5-2d1b0e9f8a7c", "name": "Casey Customer", "email": "casey@example.com", "workspaces": [ { "id": "ws_9418b705-3720-48ca-b2bf-f726d1456684", "name": "Acme Inc.", "slug": "acme", "role": "owner" } ]}More about this endpoint
Use it as a smoke test for an integration (“who am I?”).
Revoke the token making this request
Section titled “Revoke the token making this request”DELETE /v1/user/token Try it in the API playground (opens in a new tab) Revokes the personal access token that makes the request.
import { createClient } from "@reminix/sdk";
const reminix = createClient({ token: process.env.REMINIX_TOKEN });await reminix.user.revokeToken();import os
from reminix import Reminix
reminix = Reminix(token=os.environ["REMINIX_TOKEN"])reminix.user.revoke_token()reminix user revoke-token --yescurl -X DELETE "https://api.reminix.com/v1/user/token" \ -H "Authorization: Bearer $REMINIX_TOKEN"Returns nothing (204).
More about this endpoint
Use it to sign out from a script or the CLI (logout). The token stops working immediately. Your other tokens keep working.