Step 2: Fetch

# Assign your region, customer_id, and env to environment variables.
REGION=your_region 
CUSTOMER_ID=your_customer_id
ENV=your_env
CES_URL=https://home.retail.${REGION}.ocs.oracle.com:443/rgbu-common-${CUSTOMER_ID}-${ENV}
curl --location "${CES_URL}/api/data-pe/v1/fetch-credentials" \ 
--header "Authorization: Bearer ${ACCESS_TOKEN}" > response.json
# chmod 600 sets permissions to rw------- 
# so only the owner can read/write the file, 
# preventing group/others from accessing it (used for sensitive files). 
chmod 600 response.json