๐ซUse Basic Auth with Dispatcher
Overview
1. Create Basic Auth header: Authorization: Basic <base64(email:password)>
2. Include header in all Dispatcher API requests
3. No token expiration or refresh neededBasic Usage
Authorization Header
Authorization: Basic <base64_encoded_credentials>POST /api/invoicing HTTP/1.1
Host: api.docs-dispatcher.io
Authorization: Basic b2xpdmllci5yb2VsYW50c0BnbWFpbC5jb206eW91ci1wYXNzd29yZA==
Content-Type: application/json
{
"providerName": "qonto",
"documentType": "INVOICE",
"template": {
"id": 123,
"data": { /* template data */ }
}
}Code Examples
curl
Node.js (fetch)
PHP (Guzzle)
Java (HttpClient)
Authentication Errors
401 Unauthorized
403 Forbidden
Reusable Client Class
Node.js
PHP
Best Practices
1. Credential Management
2. Error Handling
3. Secure Storage
4. Never Log Credentials
Debugging Authentication
Test Your Credentials
Verify Base64 Encoding
Check Header Format
Security Considerations
1. HTTPS Only
2. Browser Security
3. Credential Rotation
Next Steps
Support
Last updated