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, and callback URLs.
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 sends these credentials only to the token endpoint, using HTTP Basic Auth, and calls the rest of the Chariot API with the access tokens it gets back. There are two kinds:
- A nonprofit access token, from the authorization code flow, acts on behalf of one nonprofit. Use it for almost every API call.
- An application access token, from the
client_credentialsgrant, acts on behalf of your application itself. Use it to set up webhooks.
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.
Scopes typically take the form resource:action, where action is read or write. A write scope includes read access to the same resource.
Other Scopes
Deprecated Scopes
These scopes are deprecated and will be removed in the future.
The user who approves your application must hold every scope you request. With delegated access, the token also loses any permission that user’s role later loses.
Delegated Access and App Installs
Chariot supports two authorization models:
- Delegated access: Your application acts on behalf of the user who authorized it. Its permissions are limited by that user’s current role.
- App install: Your application acts independently of any individual user, with permissions approved by a nonprofit Owner or Admin.
To request an app install, include the app_install scope. Otherwise, the authorization uses delegated access.
Which Should I Use?
Use delegated access when your application should act on behalf of a specific user. Use an app install for integrations that should keep working after the person who authorized them leaves the nonprofit.
Because an app install isn’t associated with a user, app_install can’t be combined with openid, profile or email. Requesting them together returns an invalid_scope error.
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
Webhooks
Receive webhooks from every nonprofit that installs your application by creating application-level Event Subscriptions.
Unlike subscriptions associated with a specific nonprofit, application-level subscriptions receive events from all nonprofits that have authorized your application through an app install with the events:read scope, including those that install it in the future.
Each event includes an organization_id identifying the nonprofit that generated it. When a nonprofit revokes your application’s access, you’ll stop receiving its events without affecting events from other nonprofits. We recommend subscribing to connection.revoked to be notified when this happens.
You only need to create each subscription once, using your application’s own access token.
The event_subscriptions:write scope is not available through delegated
access. Requesting it through a delegated authorization returns an
invalid_scope error.
Step 1: Get an Application Access Token
Use the client_credentials grant to obtain an access token for your application. Authenticate using HTTP Basic Auth:
Step 2: Create an Event Subscription
Call Create Event Subscription using your application access token.
Create one subscription for each event category you want to receive:
Error Handling
Common errors during the token exchange:
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:

