Getting authorization issue | Community
Skip to main content
Level 2
Sep 24, 2022 5:34 PM UTC
Solved

Getting authorization issue

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Sep 27, 2022 4:53 PM UTC

Ok, I am using username/password.


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

Level 4
Sep 26, 2022 4:32 AM UTC

@vandana_ratnaparkhi 

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

 

And there when you sign in and click on integrations:

 

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?

Translate
New Participant
Sep 25, 2022 12:28 AM UTC

@vandana_ratnaparkhi Did you try hitting api through postman?

Translate
Level 2
Sep 25, 2022 4:40 PM UTC

Yes, but getting access denied.

Translate
New Participant
Sep 26, 2022 2:40 AM UTC

@vandana_ratnaparkhi That means you will have to pass the credentials to access it.

Translate
joerghoh
Employee
Sep 24, 2022 6:43 PM UTC

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?

Translate
Level 2
Sep 25, 2022 4:44 PM UTC

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

Translate
joerghoh
Employee
Sep 26, 2022 6:51 AM UTC

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).

Translate