Authentication
Every request to https://api.botsi.com carries your app's secret key in the Authorization header. Find it on the App configuration page in the dashboard at https://app.botsi.com.
Authorization: {{secret_key}}
Content-Type: application/jsonSend the key raw, with no scheme prefix
There is no Bearer and no Api-Key prefix. The header value is the key itself.
Adding a prefix is the most common cause of an authentication failure that looks like a wrong key.
Making an example authenticated request#
curl -X POST "https://api.botsi.com/v2/events" \
-H "Authorization: $BOTSI_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"eventType": "paywall_shown",
"paywallSessionId": "v1.eyJhIjo0MDIxLCJ3Ijo5MDUsInAiOiJvbmJvYXJkaW5nIiwiaSI6MTc4NTMxMjAwMH0.QmzR1w"
}'Troubleshooting#
A 401 Unauthorized means no valid key was provided. Check the key matches your App configuration page exactly, and that no scheme prefix was added.
A 403 Forbidden means the key is valid but lacks permission for that resource.