Authentication
Authentication is required to access the API endpoints securely. Our API uses Bearer Token authentication, which means each request must include an authorization header with a valid token.
Using the Access Token
Once you obtain the access token, include it in the Authorization header of every request:
Example Request
curl -X POST https://api.domain.com/:path \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
This token will expire after the specified duration (expires_in
). You must request a new token once it expires.
POST/auth/token
Obtaining an Access Token
This endpoint allows you to generate an access token by providing valid credentials.
Required attributes
- Name
code
- Type
- string
- Description
Required The code assigned to your application.
- Name
token
- Type
- string
- Description
Required The token associated with your client ID.
Request
POST
/auth/tokencurl -X POST https://api.domain.com/auth/token \
-H "Content-Type: application/json" \
-d '{
"code": "your-code",
"token": "your-token"
}'
Response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI...",
"expires_in": 3600
}