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

programmatically access AEM as a Cloud Service using service-to-service access token!

Avatar

Level 4

Hi Team,

below is the link which documents how to programmatically access AEM as a Cloud Service using service-to-service access token! using node js. and they have provided link of sample code for other languages at the end of the doc which is not working.

 

How to programmatically access AEM as a Cloud Service using service-to-service access token! using java ?

 

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/a... 

 

 

Thank you,

Sriram

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @sriram_1 

 

Please find below the link of the Blog where a java code snippet is available.

It generates JWT token, and then access token from Service account credentials.

https://techrevel.blog/2023/09/06/access-restricted-resources-on-aemaacs-with-java-and-service-accou...


Aanchal Sikka

View solution in original post

2 Replies

Avatar

Community Advisor

@sriram_1 - Is there any specific error you are facing while programmatically accessing AEMaaCS using Service Credentials?

Also, where exactly the error is seen?

 

1. Calling AEM Cloud for JWT? or

2. Calling AEM Cloud for access token using JWT?

 

Please check this link as well on how to connect using node JS: https://www.npmjs.com/package/@adobe/jwt-auth

 

- Jineet

Avatar

Correct answer by
Community Advisor

Hello @sriram_1 

 

Please find below the link of the Blog where a java code snippet is available.

It generates JWT token, and then access token from Service account credentials.

https://techrevel.blog/2023/09/06/access-restricted-resources-on-aemaacs-with-java-and-service-accou...


Aanchal Sikka