API Usage
Authentication
Upbooks™ API Authentication
JWT Token Authentication
Upbooks™ APIs use JSON Web Tokens (JWT) for authentication. To obtain a bearer token, follow these steps:
- Make a POST request to the following endpoint:
POST https://api.upbooks.io/api/v1/auth/token/bearer
Content-Type: application/json
{"username": "your_username", "password": "your_password"}The response includes a JWT bearer token; store it securely.
Include Token in API Requests
Include the obtained JWT token in the Authorization header of your API requests, along with the Organization-ID and API-KEY headers:
Authorization: Bearer YOUR_JWT_TOKEN
Organization-ID: YOUR_ORGANIZATION_ID
API-KEY: YOUR_API_KEYSample cURL Request
curl -X GET https://api.upbooks.io/data-endpoint \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Organization-ID: YOUR_ORGANIZATION_ID" \
-H "API-KEY: YOUR_API_KEY"Token Expiry
JWT tokens have an expiration time. When a token expires, obtain a new one via the token endpoint.
Token Security
Keep tokens secure; never expose them in public repos or insecure environments.