OAuth 2.0 Authentication
Client ID and Client Secret
The client_id and the client_secret will be provided by your Technical Account Manager. The Client Secret is private and should not be shared.
Requesting Access Tokens
To obtain an Access Token, you must send a request containing the client_id and client_secret. To do that, the Retailer must make a POST request to the Epsilon Retail Media Authorization Server endpoint:
https://$BASE_URL/v1/oauth2/tokenYour request will require a Basic Authorization sent via the Authorization request header containing the Retailer’s client_id and client_secret base64 encoded:
Authorization: "Basic" + base64encode(client_id + ":" + client_secret)
You will need to add the following parameter using the application/x-www-form-urlencoded format in the HTTP request body:
grant_type=client_credentials
The request will look like the following:
Receiving your Access Token
The response will contain the following information
access_token: The access token to be used when calling the Epsilon Retail Media APIsexpires_in: The amount, in seconds, until the access token expirestoken_type: The type of the token returned. It will be always Bearer in this case
A sample response is below
Using the Token
Making calls against the Epsilon Retail Media API endpoints can be done by simply adding the Access Token generate to the Authorization header on the request Authorization: “Bearer “ <access_token>
Request Errors
Invalid Client
If the client_id or client_secret sent in the request is incorrect, then you will receive a response like this:
Make sure you are using the correct credentials. Double-check your client_id and client_secret and make sure you're using the Basic Authorization correctly when calling the /token endpoint. ##Invalid Request An invalid request error will be returned from the Authorization Server if the request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.
Ensure to:
Only include
grant_type=client_credentialsto the request bodySet the correct
Content-Typeto the request header

