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_id
  • client_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:

  1. Set a "Basic Auth" header, using the client_id and client_secret as the username/password. (Basic Auth combines the ID and secret separated by a colon, then base64-encodes the result.)
  2. Set the content type of the request to application/x-www-form-urlencoded.
  3. Supply a form-encoded body with the parameters:
    ParameterValue
    grant_typeclient_credentials
    scopeSpace-separated list of scopes
  4. 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_id and client_secret.


Did this page help you?