Outcome
The user is logged in and your backend holds a validaccess_token for subsequent Endaoment API calls.
When
First step of the standard journey. Trigger when the user chooses to connect or sign in to Endaoment from your app.Auth
Store
clientId and clientSecret in server-side environment variables only.
Endpoints
See also: Start OAuth authorization, Get access token, Revoke access token, End user session, and Get authenticated caller in API reference.
Required inputs
Authorize redirect query params:
Token exchange body (
application/x-www-form-urlencoded):
Example: exchange code for token
Response you need
Persist at minimum:Common mistakes
- Mismatched
redirect_uribetween authorize and token steps - Losing
code_verifierbetween login start and callback - Requesting
offline_accesswithoutprompt=consent(refresh token silently omitted) - Putting
clientSecretor access tokens in frontend code