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.
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"
}
}
}
| Field | Type | Description |
|---|
access_token | string | JWT token used in the Authorization header. |
refresh_token | string | Token used to obtain a new access token. |
expires_in | int | Access token lifetime in seconds (3600 = 1h). |
user | object | Basic profile of the authenticated user. |
Refresh token
Exchange a valid refresh token for a new access token without re-entering credentials.
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.
Response:
{
"data": {
"id": "uuid",
"email": "user@example.com",
"username": "johndoe",
"display_name": "John Doe",
"avatar_url": "https://..."
}
}
| Field | Type | Description |
|---|
id | string | Unique user identifier (UUID). |
email | string | User’s email address. |
username | string | User’s unique handle. |
display_name | string | User’s public display name. |
avatar_url | string | URL to the user’s profile image. |