API Keys & Bearer Tokens
AuthSetu uses two distinct authentication methods depending on whether a request originates from a backend server or a frontend client.
1. Backend Server Requests (`Secret Key`)
Use your Secret Key in the `Authorization` header with the `Bearer` scheme or `X-Secret-Key`:
curl https://api.authsetu.com/v1/users \
-H "Authorization: Bearer sk_live_your_secret_key"
2. Frontend Client Requests (`Publishable Key`)
Use your Publishable Key (`pk_live_...` or `pk_test_...`) in the `X-Publishable-Key` header:
curl https://api.authsetu.com/v1/client/config \
-H "X-Publishable-Key: pk_test_your_key"