Create an OAuth 2.0 client and generate an access token in the Coupa Supplier Portal. Use the access token to access CSP data using the CSP REST API.
-
Create an OAuth 2.0 client and assign scopes.
-
Navigate to .
-
Select API Clients and select Create.
-
Define these fields.
-
Select Save.
The API Client Details page displays. Note the Identifier and Secret fields to use in your API call to generate the token in the following step.
-
Send an API call to generate a token.
-
Send a POST call to
https://<your-instance>.supplier.com/oauth2/token.
Include these elements in the request body.
Example cURL request:
curl --location 'https://<your-instance>.supplier.coupahost.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=3c1ce11a8105004359a7e00b7c4cfd09' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=csp.invoices.read' \
--data-urlencode 'client_secret=4cef98122f7adcd701585789808a49714bd116a6fed5cdfe7e1c84f5e6377fb1'
The API returns a bearer token to use in subsequent API calls.