This article explains how to access your AEM instance in AEM as a Cloud Service with cURL.
Environment
AEM as a Cloud Service
Step 1. Access Cloud Manager
Step 2. Open the Developer Console of the environment (dev, stage, prod) that you want to access
Step 3. Click Integrations Local Token Get Local Development Token
Example
{
"ok": true,
"statusCode": 200,
"accessToken": "eyJh...3XAA"
}
Step4. Execute the cURL command using the accessToken
$ curl -H "Authorization: Bearer Value of accessToken" "URL of AEM"
Example
$ 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.