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

Unsupported Grant Type while hitting Authentication-Service

Avatar

Avatar
Validate 1
Level 2
chintan_shah1
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
chintan_shah1
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
chintan_shah1
Level 2

11-07-2016

Hi,

I'm trying to follow this doc (https://helpx.adobe.com/digital-publishing-solution/help/shared-content-api.html​) to create a shared entity. Now when I try to hit

https://pecs.publish.adobe.io/publication/{publication_id}/sharedContent/{shared_entity_title}​ I only always get 401 Unauthorized.

{

"error_code": "401013"

"message": "Oauth token is not valid"

}

I realized that I'll have to run the Authentication service first to get Access Token and get authenticated. Now, I run https://ims-na1.adobelogin.com/ims/token/v1

passing all the necessary params,

client_id: <client_id>

client_secret: <client_secret>

scope: AdobeID,openid

device_id: <device_id>

device_token: <device_token>

grant_type: device

However, I always get 400 Bad request saying unsupported grant type.

{

"error": "unsupported_grant_type"

}

I'm not able to figure out where I'm going wrong! Please help!

PS: I'm hitting these URL's from Google Chrome's Advance REST Client.

Replies

Avatar

Avatar
Boost 5
Employee
AndreiParaschiv
Employee

Likes

7 likes

Total Posts

49 posts

Correct Reply

18 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile

Avatar
Boost 5
Employee
AndreiParaschiv
Employee

Likes

7 likes

Total Posts

49 posts

Correct Reply

18 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile
AndreiParaschiv
Employee

11-07-2016

Hi,

Can you please generate another device id and device token using the AEX tool (https://aex.aemmobile.adobe.com/index.html ) and with the new values, remake the  authentication call ?

Thanks,

Andrei

Avatar

Avatar
Validate 1
Level 2
chintan_shah1
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
chintan_shah1
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
chintan_shah1
Level 2

11-07-2016

I just tried that. But no luck! I still get the same error.

{

"error": "unsupported_grant_type"

}

Should I give any other grant type?

Avatar

Avatar
Boost 5
Employee
AndreiParaschiv
Employee

Likes

7 likes

Total Posts

49 posts

Correct Reply

18 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile

Avatar
Boost 5
Employee
AndreiParaschiv
Employee

Likes

7 likes

Total Posts

49 posts

Correct Reply

18 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile
AndreiParaschiv
Employee

11-07-2016

The grant_type should be device.

Example of the POST method call :

https://ims-na1.adobelogin.com/ims/token/v1?grant_type=device&client_id=your_client_ID&client_secret=your_client_secret&scope=AdobeID,openid&device_token=your_device_token&device_id=your_device_id

Can you please check if before or after the device string, you have an extra space ?

Thanks,

Andrei

Avatar

Avatar
Validate 1
Level 2
chintan_shah1
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
chintan_shah1
Level 2

Likes

3 likes

Total Posts

15 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
chintan_shah1
Level 2

11-07-2016

Thanks. I got it right now. I now get Access token. Basically I was passing the params in header but it should have been in payload. However, I'm still getting the Oauth error when I try creating the Shared Entity.

{

"error_code": "401013"

"message": "Oauth token is not valid"

}

How should I use the obtained Access Token in the subsequent calls?

Avatar

Avatar
Boost 5
Employee
AndreiParaschiv
Employee

Likes

7 likes

Total Posts

49 posts

Correct Reply

18 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile

Avatar
Boost 5
Employee
AndreiParaschiv
Employee

Likes

7 likes

Total Posts

49 posts

Correct Reply

18 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile
AndreiParaschiv
Employee

12-07-2016

Hi,

Use the new Access token and remake the call.

Note that an Access token is  only available for 24 hours.

More details regarding shared content using the API, please consult the article :  Work with shared content using the On-Demand Services API