Use the Access Token in an API Call
Once you have generated the access token by passing the client ID and secret to the /token endpoint, you can use the access token in all API calls.
To use the access token in an API call:
- Construct a request, for example a GET request.
-
In the request header, specify the access token with the keyword
authorization. For example, using the cURL command line tool, your request to GET all Contacts in JSON format might look like this, where
oauth_token is a variable that contains the authorization token:
curl --request GET \ --url 'https://{{url}}/contact' \ --header 'authorization: Bearer {{oauth_token}}' \ --header 'content-type: application/json'