When apiKey is set, the SDK adds it to every request as:
x-api-key: <your-api-key>
When authToken is set, the SDK adds a Bearer token:
Authorization: Bearer <your-auth-token>
When both are set, both headers are sent on every request.
const sdk = new LilySdk({
baseUrl: 'https://api.lily.io',
apiKey: 'lk_live_xxx', // → x-api-key: lk_live_xxx
authToken: 'eyJhbGciOi...', // → Authorization: Bearer eyJhbGciOi...
});You can also add custom default headers:
const sdk = new LilySdk({
baseUrl: 'https://api.lily.io',
apiKey: 'lk_live_xxx',
defaultHeaders: {
'X-Request-Source': 'mobile-app',
},
});