Obtaining a client credentials access token
In order to make requests to the categorisation-as-a-service endpoints, you will need to request tokens with the client_credentials grant for one or more caas scopes (e.g., caas:transactions:write).
The token TTL (time to live) for
caasscopes is set to 15 minutes. To maintain secure access, ensure your application handles token expiration properly.
To get a client credentials token, you'll need to call our /token endpoint - see our authentication documentation for how to authenticate against this endpoint - and pass in the following body, along with any authentication fields specified in the authentication document.
| Field | Type | Description |
|---|---|---|
| grant_type | string | Must be set to client_credentials |
| scope | string | The scopes you wish to request for the access token |
| client_assertion_type | string | Must be set to urn:ietf:params:oauth:client-assertion-type:jwt-bearer when using private_key_jwt authentication |
| client_assertion | string | The signed JWT used for authentication with our API |
Example of a client_credentials grant for data access
curl --location --request POST 'https://identity.moneyhub.co.uk/oidc/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'scope=caas:transactions:write' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
--data-urlencode 'client_assertion=eyJhbGciOiJSUzI1NiIsImtpZCI6InRaSUpteEZfbjhfb0JaVS1WQmpmWVFpdVl4ZDU0UnhDVnk0OUVsMF9NNG8ifQ.eyJzdWIiOiJlODY5Y2UxNC03ZTA1LTQxMGItYWI3NC04NDRiMTVhNTZhMjciLCJhdWQiOiJodHRwczovL2lkZW50aXR5Lm1vbmV5aHViLmNvLnVrL29pZGMiLCJpc3MiOiJlODY5Y2UxNC03ZTA1LTQxMGItYWI3NC04NDRiMTVhNTZhMjciLCJqdGkiOiJDai05M1dKRW1TckY3WWMwTl9ucDMwLXRFeGY0RDBZS2RhNTNnNTFjVTF3IiwiaWF0IjoxNzA3OTk4NjczLCJleHAiOjE3MDc5OTkyNzN9.WPVfwX154hG6PKkwEHcbCvouH05CsC9nF_ZhMSURWYDRZ0e_oBImMBB-BmK0moN8N_FsEX2m858Z1q10_UfWUwAhsK6KTGYR8wENfNUi-5iPGOenm8dEn6gO0lud6VpRPgsTEO2aO4cM9S8KJVVYCSpm-njHSPDjDw4G1TBwxoHRAgMW-pDSOjLyoHfx_peUN26EcyqQJ1ALOYn6GBk7laMBVIYOdn883dzn1hSg3eprMUQe3MbBkJ1sxL1AMQejI5w547JSzLvyJgYDR_4n40-ZU-lwazNBZmi9mETteKv4-k4iUDANl8SMuvORkTKsyZcnx1bxQFhutT5YUthEZA'Updated about 1 month ago
