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 integration in the Adobe I/O 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_EMAIL=4API_KEY=5CLIENT_SECRET=6PRIVATE_KEY=
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 Client Credentials section of the Adobe I/O Console.
TECHNICAL_ACCOUNT_EMAIL-- this can be found in the Client Credentials section of the Adobe I/O Console.
API_KEY-- this can be found in the Client Credentials section of the Adobe I/O Console.
CLIENT_SECRET-- this can be found in the Client Credentials section of the Adobe I/O Console. Note that you have to click the
Retrieve client secretbutton to reveal this.
PRIVATE_KEY-- this is the content of the
private.keyfile generated by OpenSSL without any line breaks, i.e. all on one line.
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.