Skip to main content

Authenticating Your API Requests

Nosa O avatar
Written by Nosa O
Updated this week

Authentication

All requests for a serviceType require an access token generated through the Get Access Token request, which needs your Kuda Business email and apiKey for authentication.


Token Management

You can also set your token expiry in the Kuda business Business API Page.


Authorization Header

Use the Authorization : Bearer for authenticating your API. The access token you generate from the /GetToken request serve as the bearer for your authentication. Here is an example below:


Sample Request

bash

curl https://kuda-openapi.kuda.com/v2.1/ \

-H "Accept : application/JSON" \

-H "Authorization : Bearer {access_token}"

Authentication Flow

1. Get API Key - First, obtain your API key from your business dashboard

2. Generate Access Token - Use your email and API key to get an access token

3. Use Bearer Token - Include the access token in your API requests using the Authorization header

4. Token Expiry - Monitor and refresh tokens before they expire
​

Security Best Practices

  • Secure Storage - Store your API key and tokens securely

  • Token Expiry - Set appropriate token expiry times in your business dashboard

  • Regular Rotation - Rotate your API keys periodically for security

  • Environment Variables - Never hardcode credentials in your code

Common Issues

Authentication Errors

  • Invalid API Key - Verify your API key is correct and active

  • Expired Token - Generate a new access token

  • Incorrect Headers - Ensure you're using the correct Authorization header format

Integration Problems

  • Missing Bearer Prefix - Always include "Bearer " before your token

  • Wrong Endpoint - Make sure you're using the correct API endpoint

  • Token Format - Ensure your token is properly formatted

πŸ” Security Reminder: Always use the Authorization Bearer header format and keep your credentials secure!

Did this answer your question?