OAuth 2.0
OAuth 2.0 authenticates an HTTP connector with a token that Send AI requests from your authorization server, with a client ID and secret.
Setting it up
Choose OAuth 2.0 under Authentication Method in the HTTP connector, and fill in:
- Grant Type: The grant type is how Send AI gets its token. Choose Client Credentials: Send AI signs in as an application, without a person.
- Client ID and Client Secret: The client ID and secret are the credentials your authorization server gave Send AI.
- Token URL: The token URL is the address that hands out tokens, such as
https://api.example.com/oauth/token. - Scopes: Scopes are optional, separated by commas.
How the token is used
Send AI posts the grant type, client ID, client secret and scopes as a form to the token URL. It reads access_token and expires_in from the answer, and sends the token with every request:
Authorization: Bearer <access_token>
The token is reused until expires_in has passed, or for 24 hours when the answer has no expires_in. Send AI then requests a new one; it does not use refresh tokens.
Checking the connection
Saving the connector does not test the token request. After the first export or notification, check Deliveries: a request without a valid token usually fails there with a 401 from your API.