Skip to main content
RichRelevance

Access and Authentication

Authentication to Personalization Cloud Gateway

Oauth2 is used for authentication to the Personalization Cloud gateway. Personalization Cloud will setup a “site group” for each of the customer’s environments. The site group is related to the customer’s API Key.  

Personalization Cloud will create client_ID and client_secret for each site group and send them in the requested method.

The client_ID and client_secret are required to obtain tokens for each endpoint (service). For example, a token is required to create property definition collection by using the streaming-property service.  

Creating Tokens

Hosts:         

Production:

https://gateway.richrelevance.com/

QA   

https://qa-gateway.richrelevance.com/

Staging

https://staging-gateway.richrelevance.com/

You need to create different tokens for each streaming catalog service for each environment. For example, you cannot use the token created for the QA environment in the production environment.

To create tokens, use the request syntax below:

POST https://<host>/<streaming catalog service>/v1/oauth2/token?grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>

 

"streaming catalog service" options

  • streaming-property
  • streaming-snapshot
  • streaming-ingest
  • streaming-view
  • streaming-status

 

Example: To obtain a token for the streaming-property service in the QA environment.

In this example the client_id is 5934de97c95e1ced and the client_secret is 2l9dr0jkink11ad49hg93it52d. Each customer will have unique client_id and client_secret.

POST  https://qa-gateway.richrelevance.com/streaming-property/v1/oauth2/token?grant_type=client_credentials&client_id=5934de97c95e1ced&client_secret=2l9dr0jkink11ad49hg93it52d  

 

Response:

{
     "token_type": "bearer"
     "access_token": "M6w0M0K9QbQGHC8xgvb91ZgLMKaW4xOd",
}

 

Example with cURL:

curl -X POST https://qa-gateway.richrelevance.com/streaming-property/v1/oauth2/token -d "grant_type=client_credentials" -d "client_id=5934de97c95e1ced" -d "client_secret=2l9dr0jkink11ad49hg93it52d"

 

Requests to Personalization Cloud Gateway require the bearer Token 

For every streaming catalog API call the tokenValue for that specific service should be included.  

https://<host>/<streaming catalog service>/v1/<apiKey>
'Authorization:Bearer <tokenValue>'

Example: To create a streaming property product definition collection, use the below API request.

POST  https://gateway.richrelevance.com/streaming-property/v1/<apiKey>/collections/product

'Authorization:Bearer M6w0M0K9QbQGHC8xgvb91ZgLMKaW4xOd’

 

Example with cURL: 

curl -H 'Authorization:Bearer <tokenValue>' https://qa-gateway.richrelevance.com/streaming-property/v1/<apiKey>/collections/product

  • Was this article helpful?