How do you authenticate and securely generate an access token using the Authentication API?
Who is this for and why it matters
Use this API when you need to securely authenticate your application before interacting with any other Genuin APIs.
This matters because:
- Every API request in the Genuin ecosystem depends on a valid access token
- It ensures secure, controlled access to your Community Media Network
- It prevents unauthorized usage and enforces governance at the API level
Without successful authentication, no downstream API (content ingestion, monetization, or integrations) will work.
What does the Authentication API do?
The Authentication API generates a secure gn-access-token, which acts as your session credential for all subsequent API calls.
Think of it as:
- Your entry point into Genuin APIs
- A temporary authorization layer for secure communication
- A mandatory prerequisite for all integrations
API Details
- URL: /api/thirdparty/auth
- Method: POST
- Authentication Required: Yes
- Mandatory Fields: api_key, api_secret
Before you begin
Get your API credentials
To use this API, you must first obtain:
- API_KEY
- API_SECRET
Contact the Genuin team to receive your credentials. These are unique to your brand and required for all authentication requests.
Request Structure
{
"api_key": "YOUR_API_KEY",
"api_secret": "YOUR_API_SECRET"
}What happens to success?
Success Condition
If both api_key and api_secret are valid:
- A gn-access-token is generated
- The token is returned in the response header (Body > Header)
Response Code
200 OK
Important
You must use this gn-access-token in all subsequent API calls. Without it, other APIs will reject your requests.
Error Handling
Understanding error responses helps you debug faster and maintain reliable integrations.
1. General Error
Condition:
- Invalid request format
- Unexpected processing error
Response Code:
400 Bad Request
{
"code": "1099",
"message": "An unexpected error occurred processing the request",
"data": {}
}2. Parameters Missing
Condition:
- Required fields (api_key, api_secret) are missing
- Brand configuration is invalid or not found
Response Code:
404 Not Found
{
"code": "5235",
"message": "Brand not exists.",
"data": {}
}3. Precondition Failed
Condition:
- API usage rules are violated
- Invalid or restricted API usage
Response Code:
412 Precondition Failed
{
"code": "5166",
"message": "XXXX-[Invalid Use of API]",
"data": {}
}Best Practices
- Always store your api_key and api_secret securely
- Never expose credentials in frontend code
- Regenerate tokens securely if compromised
- Handle error responses gracefully in your integration logic
What to do next
Once you have the gn-access-token:
- Use it to authenticate all other API requests
- Pass it in headers as required by downstream APIs
- Build secure, scalable integrations across Genuin products