Client Flow
Client Credentials Flow
Client Credentials is the simplest of the OAuth2 flows supported by the Pushpay API. It allows third-party applications to authenticate to Pushpay as themselves — i.e., they are not accessing Pushpay on behalf of a Pushpay user.
Prerequisites
To obtain an access token using the Client Credentials flow, you'll need to be issued both a:
client_idclient_secret
These are issued when you sign up to our API Developer Program — contact the API Support Team and ask them to set up an account for you.
Requesting an Access Token
Once you have your credentials, make a request to the authorization server to generate an access token:
- Set a "Basic Auth" header, using the
client_idandclient_secretas the username/password. (Basic Auth combines the ID and secret separated by a colon, then base64-encodes the result.) - Set the content type of the request to
application/x-www-form-urlencoded. - Supply a form-encoded body with the parameters:
Parameter Value grant_typeclient_credentialsscopeSpace-separated list of scopes - Make a POST request to:
https://auth.pushpay.com/pushpay/oauth/token
Success Response
On success, you'll receive a 200 OK response with a JSON body like:
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1N....",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": null
}The access_token property contains the token you must use for all subsequent API requests.
Note: The Client Credentials flow does not support refresh tokens. To get a new token, simply make another access token request using your
client_idandclient_secret.
Updated 25 days ago
