Expand my Community achievements bar.

configuration and using


Level 2


I have recently activated a trial of Adobe Experience Manager (AEM) and I am trying to learn how to use the AEM Headless Client as described in the tutorials. I am particularly interested in the Node.js module available on GitHub (@adobe/aem-headless-client-nodejs).

However, I'm having difficulty identifying certain parameters required for the client configuration. Specifically, I'm not certain where to find the 'serviceURL' and 'auth' parameters, which are necessary to instantiate the AEMHeadless client.

The 'serviceURL' is presumably the URL for my AEM instance, and 'auth' would be my authentication token or credentials. However, I'm unsure where these are provided or how to generate them in the context of my AEM trial.

Here's a snippet from the GitHub README file that describes these parameters:


const aemHeadlessClient = new AEMHeadless({ serviceURL: '<aem_host>', endpoint: '<graphql_endpoint>', auth: '<aem_token>' || ['<aem_user>', '<aem_pass>'] })

In addition, I'm also unsure about how to set up the headers, especially for CORS configurations.

Could you kindly guide me on where to find these parameters, or provide me with documentation that outlines this process? Any information on any pre-configuration steps that might be necessary would also be greatly appreciated.

Looking forward to your assistance.

Best regards

4 Replies


Level 2

Hi and thanks for the reply,

I checked  the link you sended to me but actually the problem is i can't find where i can see  ServiceURL and how compose the header to make the correct request on api and get json response using GraphQL Query .  i'm trying to use aemHeadlessclient node js on github  i'm following istruction but i can't find these paramaters. can you send me documentation section . Thanks in advance.





Community Advisor

@SimonePi  The token mechanism is used with AEM as a Cloud Service server.

For local development, we generally use the credentials.


I guess you are looking specifically for local development environment. 


Can you please guide us to the documentation, where tokens are specifically needed? 

Aanchal Sikka


Level 2

Hello @aanchal-sikka,

Thank you for your reply. I am currently trying to use AEM as a Cloud Service Server because I've encountered some issues while attempting to install AEM locally. Despite having installed the correct version of the JDK, the executable gets stuck in a loop stating "start up on port 4502". I've ensured the port is free, but even after hours, there is no progress.

In using AEM as a Cloud Service, I'm following the instructions detailed in the tutorial and in the readme file for using the Node.js version of the aemheadlessclient on GitHub. I've been able to pass the token, but I'm having difficulty locating the ServerURL within the Cloud Service, and I'm uncertain about how to find it.

I'm using this resource: https://github.com/adobe/aem-headless-client-nodejs, which is linked from the AEM tutorial page. Any additional guidance you could provide on how to locate the ServerURL would be greatly appreciated.