OAuth
OAuth access is not self-service. Contact support@givechariot.com to register your application and receive client credentials. Include your application’s display name, logo, callback URLs, and optionally the IP addresses to whitelist.
How It Works
Chariot implements the OAuth 2.0 Authorization Code flow with PKCE (Proof Key for Code Exchange):
- Your application generates a PKCE code verifier and code challenge
- Your application redirects a nonprofit user to Chariot’s authorization page with the code challenge
- The user reviews the requested permissions and approves access
- Chariot redirects back to your application with an authorization code
- Your server exchanges the code and the code verifier for access and refresh tokens
- You use the access token to call the Chariot API on behalf of the organization
Authentication
When Chariot registers your application, you’ll receive a client_id and client_secret. Your server uses these credentials (via HTTP Basic Auth) to authenticate with Chariot during the OAuth token exchange and refresh flows. Once you have an access token, your server uses that token — not the client credentials — to call the Chariot API on behalf of the nonprofit.
Your client secret should be kept secure and should never be exposed to the public.
Environments
Note that each environment issues its own client_id and client_secret. This means that sandbox credentials cannot be used in production and vice versa.
Additional OAuth 2.0 and OIDC metadata can be found at the environment’s well-known discovery document.
Scopes
Scopes define what your application can access. Specify multiple as a URL encoded space-separated string when requesting authorization. The scopes your client is allowed to request are fixed during client registration.
read_only and read_write are aggregates — they grant their level of access across every resource, so you do not have to enumerate a scope per resource or request new ones as the API grows. Neither grants Chariot’s internal administrative operations.
A token only receives the permissions your client, the authorization, and the
consenting user’s role all have in common. Request read_only alongside
read_write if you serve nonprofits whose users hold read-only roles — a
read-only user cannot approve a request for read_write alone.
Authorization Code Flow
Step 1: Generate a PKCE Code Verifier and Challenge
Before redirecting the user, generate a cryptographically random code verifier (43-128 characters, using A-Z, a-z, 0-9, -, ., _, ~), then compute its SHA-256 hash and base64url-encode it to create the code challenge:
Store the codeVerifier — you’ll need it in Step 5.
Step 2: Redirect to Chariot
Direct the user’s browser to Chariot’s authorization endpoint:
Example:
Step 3: User Provides Consent
Chariot presents the nonprofit user with a consent screen showing your application name, logo, and the permissions being requested.
Step 4: Receive the Authorization Code
After approval, Chariot redirects back to your redirect_uri:
Always verify that the returned state matches the value you sent in Step 2
to prevent CSRF attacks.
Authorization codes expire shortly after they were issued and can only be used once.
Step 5: Exchange the Code for Tokens
Make a server-side POST request to the token endpoint, authenticating with HTTP Basic Auth. Include the code_verifier you generated in Step 1:
Response:
Using Access Tokens
Include the access token in the Authorization header of your API requests:
Access tokens expire after 15 minutes. Use the refresh token to obtain a new one.
Refreshing Tokens
When an access token expires, exchange your refresh token for a new token pair.
Refresh tokens are single-use. After a successful exchange, you must use the new refresh token returned in the response. Reusing a previously exchanged refresh token may result in authorization revocation, requiring the nonprofit to re-authorize your application.
Response:
Refresh tokens use a sliding window expiration:
- Each use extends the refresh token’s lifetime by 31 days
- The absolute maximum lifetime is 365 days, and refreshing does not extend it
- After 365 days, the user must re-authorize your application
Token Lifetimes
Error Handling
Common errors during the token exchange:
IP Whitelisting
Some APIs restrict access to a set of registered IP addresses in addition to OAuth. Where this applies, the check runs before the token is validated — a request from an unregistered address receives a 403 Forbidden even with a valid access token:
Addresses are registered as CIDR ranges when your application is set up. Contact support@givechariot.com to add or change them.
Redirect URI Requirements
Redirect URIs are validated when your application is registered and again at authorization time. Each URI must meet the following requirements:
At authorization time, the redirect_uri parameter must exactly match one of your registered URIs. Scheme and host are compared case-insensitively, but the path must match exactly. Wildcard or pattern matching is not supported.
Valid examples:
Invalid examples:

