Querybuilder API 401 Error | Community
Skip to main content
New Participant
Feb 13, 2023 7:49 PM UTC
Solved

Querybuilder API 401 Error

Hi-

I am using the AEM provided wknd starter site to create a demo environment and I am trying to use the Querybuilder API for a list of pages. I have sent a request with basic authentication using my AEM credentials but continue to get a 401 unauthorized error. 

https://author-p92367-e844390.adobeaemcloud.com/bin/querybuilder.json?type=cq:PageContent&path=/content/wknd/us/en/adventures&p.limit=-1

Am I missing a step? Do I need to "turn on" or configure the Querybuilder API to get started? I was under the impression this was available out-of-the-box. I am sure that my username and password are correct because I am signed in to my author environment already. 

 

I appreciate any advice! thank you!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Nitin_laad
Nitin_laadAccepted solution
New Participant
Feb 15, 2023 3:11 AM UTC

Postman is primarily designed for invoking API calls. In the event that there is a need to invoke a query builder in order to access any cloud-based API, it is imperative to provide authentication information. The AEM Cloud service offers a solution to this requirement by utilizing token-based authentication for HTTP requests originating from external applications, services, or systems.

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/authentication/overview.html?lang=en

I was able to invoke the querybuilder API using authentication token(bearer token, generated using Node.js app).

3 replies

Nitin_laad
New Participant
Feb 13, 2023 8:20 PM UTC

Hi @mattmalone212 Think of integrating with Adobe Experience Manager (AEM) as a Cloud Service as entering a secure castle. AEM's Developer Console acts as the key to the castle, granting access to Service Credentials, which allow external applications, systems, and services to communicate with AEM's Author or Publish services over HTTP

check this out for more details -

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/authentication/service-credentials.html

Translate
New Participant
Feb 14, 2023 6:16 PM UTC

Thanks @nitin_laad - I think this may be separate from what I am looking for. I'm looking to use the Querybuilder API and use basic auth credentials and not use an access token retrieved through JWT.

Additionally, my request URL works in my browser that I have logged into AEM with but it returns the 401 from Postman. Any further ideas?


Thanks,

Translate
Nitin_laad
Nitin_laadAccepted solution
New Participant
Feb 15, 2023 3:11 AM UTC

Postman is primarily designed for invoking API calls. In the event that there is a need to invoke a query builder in order to access any cloud-based API, it is imperative to provide authentication information. The AEM Cloud service offers a solution to this requirement by utilizing token-based authentication for HTTP requests originating from external applications, services, or systems.

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/authentication/overview.html?lang=en

I was able to invoke the querybuilder API using authentication token(bearer token, generated using Node.js app).

Translate