Partner Authentication
Before accessing the Subuser APIs, platform partners must authenticate and obtain an access token. This token is required for all subsequent API calls.
Authentication Endpoint
To obtain an access token, partners should make a POST request to:
POST https://api.logfire.ai/api/auth/signin
Request Headers
Content-Type: application/json
Request Body
{
"email": "partner@example.com",
"credential": "your_password",
"authType": 2
}
Response Body
{
"isSuccessful": true,
"code": 2,
"email": "partner@example.com",
"userBody": {
"firstName": "John",
"lastName": "Doe",
"customCss": null,
"logRetentionPeriod": 30,
"maxLogSize": 2097152,
"maxStorage": 5368709120,
"maxTeams": 3,
"maxTeamMembers": 3,
"maxSources": 5,
"accountType": "partner",
"platformPartner": true,
"profileId": "<uuid>",
"accountId": "<uuid>",
"onboarded": true,
"email": "partner@example.com",
"accessApproved": true,
"accountStatus": true
},
"teamBody": {
"id": "<uuid>",
"name": "Team Name",
"accountId": "<uuid>",
"role": "owner",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"deleted_at": null
},
"bearerToken": {
"accessToken": "<jwt_access_token>",
"refreshToken": "<jwt_refresh_token>",
"exp": "2024-01-02T00:00:00Z",
"iat": "2024-01-01T00:00:00Z"
}
}
Response Fields
Top Level
isSuccessful
: Boolean indicating authentication successcode
: Response codeemail
: Authenticated user’s email
User Body
- Account limits and configuration:
logRetentionPeriod
: Days logs are retainedmaxLogSize
: Maximum size of individual log entry in bytesmaxStorage
: Total storage limit in bytesmaxTeams
: Maximum number of teams allowedmaxTeamMembers
: Maximum members per teammaxSources
: Maximum log sources allowed
- Account details:
accountType
: Type of accountplatformPartner
: Boolean indicating partner statusprofileId
: Unique identifier for user profileaccountId
: Unique identifier for account
Team Body
- Basic team information for the authenticated user
- Includes team ID, name, and role information
Bearer Token
accessToken
: JWT token for API authenticationrefreshToken
: Token for refreshing access tokenexp
: Token expiration timestampiat
: Token issued at timestamp
Using the Access Token
For all subsequent API calls, include the access token in the Authorization header:
Authorization: Bearer <access_token>
Error Responses
Status Code | Description |
---|---|
401 | Invalid credentials |
403 | Account not found or inactive |
429 | Too many requests |
Rate Limiting
- Authentication requests are limited to 10 requests per minute
- Exceeding this limit will result in a 429 response