Get Token (Authentication API)
Get a token to authenticate other APIs.
This API authenticates the client using an API Key and returns a JWT access token to be used in subsequent API requests.
Getting an API Key
Before you can authenticate, you must first obtain an API Key from the technical team.
Once the sales team issues your API Key, you can use it with this authentication endpoint.
Method | Base URL | Endpoint |
POST | https://reports.inspektlabs.com | /api/upload |
Headers
Key | Value | Required |
Content-Type | application/json | Yes |
Click the button below to download the Postman collection for the API.
get_token_api.json4.4 KB
Payload
{
"key": "<YOUR_API_KEY>",
"client_id": "<YOUR_CLIENT_ID>"
} Parameters
Field | Type | Description | Required |
key | string | The client’s API Key for authentication. | Yes |
client_id | string | Optional client identifier (auto-resolved for EU). | Optional |
Response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR..."
}Error message and status code
HTTP Code | Status | Message | Condition |
200 | success | "access_token": "<JWT Token>" | API Key is valid → returns JWT access token. |
400 | error | API Key is required | Missing key in request body. |
400 | error | Invalid data: <reason> | Invalid request payload. |
400 | error | Something went wrong. Please try again later. | Unexpected exception during processing. |
401 | error | Invalid API Key. Please try again or contact support | API Key provided is invalid. |
403 | error | Unauthorized access | Request originated from a blocked IP or blocked API Key. |
cURL
curl -X POST https://reports.inspektlabs.com/auth/get_token/ \
-H "Content-Type: application/json" \
-d '{
"key": "<YOUR_API_KEY>",
"client_id": "<YOUR_CLIENT_ID>"
}'Replace YOUR_API_KEY and YOUR_CLIENT_ID with your actual values.
←Home
On this page
- Get Token (Authentication API)
- Headers
- Payload
- Parameters
- Response
- Error message and status code
- cURL