How to access your AEM instance in AEM as a Cloud Service with cURL
The article outlines the steps to access an Adobe Experience Manager (AEM) instance in AEM as a Cloud Service using cURL commands.
Description description
Environment
- Adobe Experience Manager
- Adobe Experience Manager as a Cloud Service
Issue/Symptoms
How to access AEM instance in AEM as a Cloud Service with cURL.
Resolution resolution
Follow the steps given below:
-
Access Cloud Manager
-
Open the Developer Console of the environment (dev, stage, prod) that you want to access
-
Click on Integrations
>
Local Token>
Get Local Development TokenExample:
code language-none { "ok": true, "statusCode": 200, "accessToken": "eyJh...3XAA" }
-
Execute the cURL command using the accessToken
code language-none $ curl -H "Authorization: Bearer <Value of accessToken>" "<URL of AEM>"
Example
code language-none $ curl -H "Authorization: Bearer eyJh...3XAA" "https://author-p12345-e6789.adobeaemcloud.com/content/wknd/us/en.json" {"jcr:created":"Wed Feb 22 2023 04:07:45 GMT+0000","jcr:createdBy":"admin","jcr:primaryType":"cq:Page"}
The accessToken value is valid for 24 hours.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f