The Cloud Manager API Tutorial walks through the process of creating an integration between Cloud Manager and either Microsoft Teams or Slack.
The files used in this tutorial can all be found in GitHub in the repository at https://github.com/AdobeDocs/cloudmanager-api-tutorial. The result of each tutorial step is in a separate file:
|1||Basic Webhook Setup|
|2||Webhook Signature Validation|
|3||Looking for Specific Event Type|
|4||Getting an Access Token|
|5||Getting Execution Data|
|6||Getting Program Data|
|7||Notifying Microsoft Teams|
Before starting the tutorial, you must first set up an project in the Adobe Developer Console. First, follow the instructions on the Creating an API Integration to create an API integration. You'll add the Event Provider integration in a later step.
This tutorial does involved coding, so you're going to want to open up your favorite IDE now. Create a new project in your IDE with an empty folder. In this project, create a file named
.env. This file is going to hold various configuration variables which should be kept out of the code.
Populate this file with the following content:
Copied to your clipboard1PORT=40002ORGANIZATION_ID=3TECHNICAL_ACCOUNT_ID=4CLIENT_ID=5CLIENT_SECRET=
Let's go through each of these and set them.
PORT-- this is the port on which the webhook will listen. 4000 is a good default value, unless something else is using this port.
ORGANIZATION_ID-- this can be found in the Credentials details section of the Adobe Developer Console.
TECHNICAL_ACCOUNT_ID-- this can be found in the Credentials details section of the Adobe Developer Console.
CLIENT_ID-- this can be found in the Credentials details section of the Adobe Developer Console.
CLIENT_SECRET-- this can be found in the Credentials details section of the Adobe Developer Console. Note that you have to click the
Retrieve client secretbutton to reveal this.
You will also need to create a directory named
.data and place the
private.key file generated by OpenSSL or the Adobe Developer Console in this directory.
In order to use the Node packages dependened upon, you'll need to create a basic
package.json file. To do this, open up a Terminal/Shell window in the project directory and run
Copied to your clipboardnpm init -y
from the Terminal or Shell.
With all that done, you're ready to start the actual tutorial. Continue to Step 1.