Skip to end of metadata
Go to start of metadata

In this topic:

When you perform a Coveo Cloud V2 platform REST API operation call, you must ensure that the access token you use to authenticate your API call minimally grants you the privileges which are required to access the endpoint (see Privileges). Otherwise the call typically returns a 401 UNAUTHORIZED response.

Use the Get all organization privileges for the access token operation to retrieve the list of privileges which are granted to a certain access token (OAuth2 token, Coveo Cloud V2 API key, or JWT search token) in the scope of a specific Coveo Cloud V2 organization.

Request template

In the request path:

  • Replace <MyorganizationId> by the actual ID of the target Coveo Cloud V2 organization (see Getting the organizationId).
  • Replace <MyAccessTokenToValidate> by the access token whose privileges you want to retrieve.

In the Authorization HTTP header:

  • Replace <MyAccessToken> by a valid Coveo Cloud V2 platform access token. This access token does not need to have any privileges in the target Coveo Cloud V2 organization.

The body of a successful response (200 OK) contains the list of privileges granted by the token that corresponds to the accessToken you provide as a query string argument (see Valid Privilege owner, targetDomain, and type Combinations). Those privileges only apply within the confines of the target Coveo Cloud V2 organization.

Sample Request

Request - Getting the privileges of an access token
Successful response - 200 OK
  • No labels