Skip to main content

Authentication

Learn how to authenticate with the Zoqq API.

Obtain Access Tokenโ€‹

This API authenticates and retrieves an access token for API operations.
To get started, you must first obtain an access token, which is required to access all other API endpoints.
Use your unique Client ID and X-API Key to call the Authentication API. Upon a successful request, you will receive a unique Auth Code that remains valid for approximately 30 minutes.
During this period, you can make API calls using the token. Once the Auth Code expires, you will need to generate a new one to continue accessing the APIs.

POST {{baseUrl}}/api/v1/authentication/login

Description

This endpoint authenticates the client and returns an access token with specified permissions.

๐Ÿ“ฉ Request Headers

x-api-key string required

Shared X-API key by Zoqq

Content-Type string required

Must be application/json

๐Ÿ“ฆ Request Body Parameters

client_key string required

Client identification key

client_secret string required

Client secret key

email string required

Client's email ID

Request Example

curl --location --request POST \
--url '{{baseUrl}}/api/v1/authentication/login' \
--header 'x-api-key: {{Shared X-API key By Zoqq}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_key": "{{ClientID}}",
"client_secret": "{{ClientSecret}}",
"email": "test@email.com"
}'

Response Example

{
"code": 200,
"status": "success",
"message": "Access token generated successfully",
"data": [
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfa2V5IjoiMTIzIiwiY2xpZW50X3NlY3JldCI6WyIxMjMiXSwiZW1haWwiOiJ0ZXN0QGVtYWlsLmNvbSIsImlhdCI6MTc2MjE1MTQ0MiwiZXhwIjoxNzYyMTU1MDQyfQ.G4TmZ4sMJGg6VwnrgSPRel8ePPH6usDkqv3BU3vIbo0",
"expiry_time": 1762155042
}
]
}