Expand my Community achievements bar.

SOLVED

Client Credentials Grant - invalid_client

Avatar

Level 1

Hello guys, okay? I'm trying to get the token to perform requests on API Data Warehouse. I created an account Adobe ID and also associated the company Adobe ID account. Then I created an application to have the ID and the Secret. The problem is that when I try to get the token using the curl is giving error.

Command

curl -i -v "https://api.omniture.com/token" -u 'YOUR_CLIENT_ID:YOUR_CLIENT_SECRET' -d "grant_type=client_credentials"

Error

<
{"error":"invalid_client","error_description":"The client credentials are invalid"}* SSLv2, Unknown (23):
* Connection #0 to host api.omniture.com left intact

 

Can anyone help me?

Thank you

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Are you using your client ID and your shared secret after the -u parameter, or are you using the literal string of 'YOUR_CLIENT_ID:YOUR_CLIENT_SECRET'? In order for requests to work, you must be using your client ID and secret, not the placeholder. 

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Are you using your client ID and your shared secret after the -u parameter, or are you using the literal string of 'YOUR_CLIENT_ID:YOUR_CLIENT_SECRET'? In order for requests to work, you must be using your client ID and secret, not the placeholder. 

Avatar

Former Community Member

Hello,

I have the same error message. I linked my Adobe account with the Analytics account, then I created an Application in Developer Connection portal with the same user. It creates an Application ID and Application Secret. The I used that to request for a token and it does not work.

For Example:

     
Application IDab67ep86fd-testinguser
     
Application Secret0183iejjpld78562p84o

I tried three different ways:

curl -i -v "https://api.omniture.com/token" -u 'ab67ep86fd-testinguser:0183iejjpld78562p84o' -d "grant_type=client_credentials"
curl -i -v "https://api.omniture.com/token" -u 'ab67ep86fd:0183iejjpld78562p84o' -d "grant_type=client_credentials"
curl -i -v "https://api.omniture.com/token" -u 'testinguser:0183iejjpld78562p84o' -d "grant_type=client_credentials"

The API response:

{"error":"invalid_client","error_description":"The client credentials are invalid"}* Connection #0 to host api.omniture.com left intact

Nothing works. Can somebody please help me out?

Thanks,

OG.

Avatar

Former Community Member

At the end I found the problem, you need to use double quotation in all the parameters you send to the request:

The correct one is:

curl -i -v "https://api.omniture.com/token" -u "ab67ep86fd-testinguser:0183iejjpld78562p84o" -d "grant_type=client_credentials"

Cheers!