Skip to main content

Outcome

The user is logged in and your backend holds a valid access_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_uri between authorize and token steps
  • Losing code_verifier between login start and callback
  • Requesting offline_access without prompt=consent (refresh token silently omitted)
  • Putting clientSecret or access tokens in frontend code

Full sample

PKCE generation and callback handling: GitHub quickstart backend. Shared patterns: Integration Patterns. Next: Open a Fund