StarSling
APIIdentity

Your identity and credential

Who you are and which credential you presented (sling whoami). credential.type discriminates a session — a browser cookie or a device-flow bearer token — from an api-key caller, which also carries its key id and scopes.

View Markdown
GET/api/whoami

Authorization

bearerAuth
AuthorizationBearer <token>

Session token from sling login.

In: header

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/whoami"
{  "identity": {    "userId": "u_abc123",    "name": "Ada Lovelace",    "email": "ada@example.com",    "githubLogin": "ada"  },  "credential": {    "type": "session",    "expiresAt": "2026-08-19T09:41:00.000Z"  }}