Token Access

Overview

To retrieve a token for accessing the TrustArc APIs, use the token endpoint with the grant_type=client_credentials flow of the OAuth 2.0 specification.

What you can do
Retrieve an OAuth 2.0 bearer token using client credentials
Review required query parameters and their accepted values
Reference sample requests and expected success and error responses
Prerequisites
A TrustArc API client_id and client_secret for your client application
Access to a tool or environment capable of making HTTP POST requests (for example, curl or an API client)
Endpoint Reference
Method
POST
URL
https://api.trustarc.com/api/auth/oauth/token
URL Parameters
Required Query Parameters
Name Value Description
client_id String Client application credentials. Can also be passed as a Basic Authorization header, where client_id is the username and client_secret is the password.
client_secret String
grant_type String The OAuth 2.0 grant type method used. Value: 'client_credentials'
Sample Request with curl
curl -X POST \
  -d 'grant_type=client_credentials&client_id=&client_secret=' \
  'https://api.trustarc.com/api/auth/oauth/token'
Responses
Success Response
Code: 200 OK
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer",
  "expires_in": 21599,
  "scope": "openid profile email",
  "accountId": "bg4sea4f-b9c9-48e7-b13a-d3e7dd2cdf44",
  "firstName": "User",
  "lastName": "Name",
  "jobTitle": "LegalPrivacyCompliance",
  "userId": "9d2eec10-5137-4592-bdcc-5d31bfc3f0dd",
  "email": "user.name@example.com"
}
Error Responses
Code: 400 Bad Request
Code: 401 Unauthorized
TrustArc  ·  API Token Authentication  ·  support.trustarc.com