Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

how to get access token using grant_type:client_credentials

Avatar

Avatar
Validate 1
Level 1
rsjakka
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
rsjakka
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
rsjakka
Level 1

13-05-2021

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

152 likes

Total Posts

312 posts

Correct Reply

101 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

152 likes

Total Posts

312 posts

Correct Reply

101 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
ishans52004352
Employee

14-05-2021

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"

Answers (2)

Answers (2)

Avatar

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

152 likes

Total Posts

312 posts

Correct Reply

101 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

152 likes

Total Posts

312 posts

Correct Reply

101 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
ishans52004352
Employee

14-05-2021

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.

Avatar

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

152 likes

Total Posts

312 posts

Correct Reply

101 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Affirm 100
Employee
ishans52004352
Employee

Likes

152 likes

Total Posts

312 posts

Correct Reply

101 solutions
Top badges earned
Affirm 100
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
ishans52004352
Employee

14-05-2021

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.