Skip to main content
May 13, 2021 7:36 AM UTC
Solved

how to get access token using grant_type:client_credentials

I am trying to fetch the access token using the grant_type = client_credentials. But I am getting an error "invalid client". Can anyone help how to get the access token by using grant_type client_credentials. Do we need any permission to get the grant_type as client credentials?

Below is the snippet which i am trying to hit the token usint Python.

token_url = 'https://ims-na1.adobelogin.com/ims/token/v1' payload = {'grant_type': 'client_credentials'} response = requests.post(url=token_url, auth=(client_id,client_secret), data=payload) print(response.text)

 

Please provide the solution to resolve it. Also, please let me know the validity of access_token once we generated.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
isinhaAccepted solution
Adobe Employee
May 14, 2021 10:57 AM UTC

Can you please try using the below request while replacing the actual client ID and client secret?

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

6 replies

isinhaAdobe EmployeeAccepted solution
Adobe Employee
May 14, 2021 10:57 AM UTC

Can you please try using the below request while replacing the actual client ID and client secret?

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

Translate
rsjakkaAuthor
May 14, 2021 5:30 PM UTC
Still getting the error as
Translate
Adobe Employee
May 14, 2021 5:38 PM UTC

lt's likely you are entering the incorrect client ID or secret. I'd recommend that you reach out to Client Care with the details and they will let you know the reason.

Translate
rsjakkaAuthor
May 14, 2021 5:42 PM UTC
I copied the client id and secret from the console Oauth Web. But still it is not working
Translate
Adobe Employee
May 14, 2021 5:45 PM UTC

I think the access token is needed for JWT integration and not OAuth integration. Can you check? It's not possible for me to tell the exact reason without looking into the details of the integration and your setup.

Translate