Authentication
The Tajir API uses Bearer Token authentication. Every request must include a valid API token in the Authorization header.
Token Format
Authorization: Bearer tjr_a1b2c3d4e5f6...Tokens are prefixed with tjr_ followed by 64 hex characters.
Generating Tokens
- Log into your Admin Dashboard at
admin.durj.ly - Navigate to Integrations (التكاملات)
- Click Create New Token (إنشاء مفتاح API جديد)
- Give it a descriptive name (e.g., “Odoo Production”)
- Copy the token immediately — it won’t be shown again
Token Security
- Tokens are stored as SHA-256 hashes — we cannot retrieve your raw token
- Each token is scoped to a single tenant (store)
- Tokens can be revoked instantly from the dashboard
- Set an expiration date for temporary integrations
Error Responses
401 Unauthorized
{ "statusCode": 401, "message": "Missing or invalid Authorization header. Use: Bearer <token>"}429 Too Many Requests
{ "statusCode": 429, "message": "Rate limit exceeded. Please retry after the window resets."}Best Practices
- Never expose tokens in client-side code — only use them server-to-server
- Use different tokens for development and production
- Rotate tokens regularly — revoke old ones after generating new ones
- Set expiration dates for tokens used by contractors or temporary integrations
- Monitor last_used_at in the dashboard to detect unused tokens