Getting The Access Token
To authenticate your application and start making API requests, you'll need to exchange your client ID and secret for an access token. Here's how you can do that:
Step 1: Send a POST Request
Send a POST request to our token endpoint. The URL for this endpoint is
https://api.paywithbreeze.com/api/v1/oauth/token
Include the following parameters in the body of your request:
- client_secret: The base64 encoded format of clientID:clientSecret
- grant_type: The type of grant. For this request. Here use the value “token”
Here's an example of how to make this request using curl:
$ curl -X POST https://api.paywithbreeze.co/api/v1/oauth/token \
-d client_secret=encoded base 64 value of clientId:clientSecret \
-d grant_type=”token”
If your request is successful, you'll receive a response that includes your access token. The response will look something like this:
{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "Bearer"
}
The access_token is the token that you'll use to authenticate your API requests.
Step 2: Use the Access Token
To use the access token, include it in the Authorization header of your API requests. The value of the Authorization header should be Bearer YOUR_ACCESS_TOKEN.
Here's an example of how to make a request with the access token using curl:
$ curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
https://api.paywithbreeze.co/api/v1/users
Replace YOUR_ACCESS_TOKEN with your actual access token.