On this page: Set up credentials, get an access token, and send a first read-only request to a Journey Optimizer API so you can confirm that your setup works before you build an integration.
Before you start prerequisites
- You have access to Adobe Developer Console in your organization.
- An administrator can add permissions to a product profile in the Adobe Admin Console.
- You know the name of the sandbox you want to work in. API calls run against one sandbox. Use a development sandbox for your first call. Learn about sandboxes
Step 1: Create credentials credentials
- In Adobe Developer Console, create a project and add the Journey Optimizer API to it with the OAuth Server-to-Server method. The JWT method is deprecated.
- Ask your administrator to add the permissions that the endpoint needs to the product profile linked to your project. For example, the Journeys API requires Journey Manage and Journey View on the target sandbox.
- From the project, copy the API key (client ID) and note your organization ID.
The detailed steps are in Authentication. For a full walkthrough of the Developer Console project, OAuth Server-to-Server credentials, and product profiles, see Authenticate and access Experience Platform APIs.
Step 2: Get an access token token
Request an access token with your client ID and client secret. Use the scopes shown for your credential in Adobe Developer Console.
curl -X POST 'https://ims-na1.adobelogin.com/ims/token/v3' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id={API_KEY}&client_secret={CLIENT_SECRET}&scope=openid,AdobeID,read_organizations,additional_info.projectedProductContext,session'
The response contains the access_token value to use as {ACCESS_TOKEN} in the next step. Access tokens expire after 24 hours, so request a new token when a call returns a 401 error. To generate a token from the console instead, see Generate an access token.
Step 3: Send a read-only request request
Start with a request that only reads data. This example lists journeys with the Journeys API. The pageSize parameter limits the number of results.
curl -X GET 'https://platform.adobe.io/ajo/journey?pageSize=5' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json'
Replace each placeholder with the values from the previous steps. You can also send the request from the interactive console on the API reference page, or use the Journey public API Postman collection.
The response is a paginated list. This abbreviated example shows the main properties:
{
"results": [
{
"id": "{JOURNEY_ID}",
"name": "Welcome journey",
"version": "1",
"type": "unitary",
"status": "Draft",
"imsOrgId": "{IMS_ORG}",
"sandboxName": "{SANDBOX_NAME}"
}
],
"page": 0,
"limit": 5,
"pages": 1
}
The page value starts at 0. Add page to the request to retrieve the next set of results. Use fields to return only some properties.
A 200 response with a JSON body confirms that your credentials, permissions, and sandbox are set correctly. To test your credentials without a Journey Optimizer endpoint, see Test access credentials.
Fix common errors errors
401Authorization header400filter or pageSizeresultsx-sandbox-name value and the filter parameterFor errors returned by a specific API, see Troubleshoot API calls. For error code meanings, see the Error codes reference.
Step 4: Move to a real use case use-case
When the read-only call works, move to the call your integration needs. For example, to send an order confirmation from your own system, create an API-triggered campaign and call the Interactive Message Execution API. See the code samples and the Send transactional messages use case.
Next steps next-steps
- Work with Journey Optimizer APIs: find the API for your task.
- Get started for developers: SDKs, events, and custom actions.