Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
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.

View solution in original post

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.

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?