Skip to main content

Generate your API key

You can create and manage API keys from Admin > Settings > API inside your Tryno dashboard.
API keys carry the same permissions as the account that created them. Keep them secure and never expose them in client-side code.

Endpoints

Login

Authenticate a user with email and password. Returns an access token and a refresh token.
POST /v1/auth/login
Request body:
{
  "email": "user@example.com",
  "password": "your_password"
}
Response:
{
  "data": {
    "access_token": "eyJ...",
    "refresh_token": "abc...",
    "expires_in": 3600,
    "user": {
      "id": "uuid",
      "email": "user@example.com",
      "username": "johndoe"
    }
  }
}
FieldTypeDescription
access_tokenstringJWT token used in the Authorization header.
refresh_tokenstringToken used to obtain a new access token.
expires_inintAccess token lifetime in seconds (3600 = 1h).
userobjectBasic profile of the authenticated user.

Refresh token

Exchange a valid refresh token for a new access token without re-entering credentials.
POST /v1/auth/refresh
Request body:
{
  "refresh_token": "abc..."
}
Response:
{
  "data": {
    "access_token": "eyJ...",
    "refresh_token": "def...",
    "expires_in": 3600
  }
}
Each refresh token can only be used once. After a successful refresh, the previous token is invalidated and a new one is returned.

Get current user

Retrieve the profile of the currently authenticated user.
GET /v1/auth/me
Response:
{
  "data": {
    "id": "uuid",
    "email": "user@example.com",
    "username": "johndoe",
    "display_name": "John Doe",
    "avatar_url": "https://..."
  }
}
FieldTypeDescription
idstringUnique user identifier (UUID).
emailstringUser’s email address.
usernamestringUser’s unique handle.
display_namestringUser’s public display name.
avatar_urlstringURL to the user’s profile image.