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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Getting authorization issue

Avatar

Level 2

I am getting this error message “org.apache.http.client.HttpResponseException: status code: 401, reason phrase: Unauthorized” while trying to hit the api of this url “https://author-p69802-e616155.adobeaemcloud.com”. I have implemented SSL certification also but still getting the same error message.

 

Could you please help to resolve this issue.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

What password are you using? You cannot do a POST of your AEM credentials (which you enter either at IMS or at the SSO solution of your company) to AEM, that won't work.

10 Replies

Avatar

Employee Advisor

Hi.

 

Do I understand correctly, that you have java code, which tries to connect to the mentioned URL? What approach do you use for authentication?

Avatar

Level 2

I am trying to hit api through postman and getting unauthorized exception.

Avatar

Employee Advisor

What type of authentication (and therefor: credentials) are you using? JWT token? Username/password as basic auth?

 

(Remember, that in AEM as a Cloud Service the authentication normally works using IMS and tokens, unlike the "classic" way of using username/password).

Avatar

Correct answer by
Employee Advisor

What password are you using? You cannot do a POST of your AEM credentials (which you enter either at IMS or at the SSO solution of your company) to AEM, that won't work.

Avatar

Level 2

Already passing the credentials and also implemented SSL certificate but still getting access denied.

Avatar

Level 5

@vandana_ratnaparkhi 

Make sure you are using a bearer token that you generate from AEM development console:

spidey1405_0-1664166680706.png

 

And there when you sign in and click on integrations:

spidey1405_1-1664166722276.png

 

You can generate a developer token which you could use to make a call and perform requests.

Can you share screenshot of your postman window?