Instructions designed for use in the Web app or Postman's desktop app v8.
- Choose Your User Interface (Desktop or Web)
- Create an Installed Package in Marketing Cloud
- Fork the Collection
- Configure the Collection
- Execute a Request
Download and install the Postman app from this link.
Using a browser, sign up/in to Postman.
- Go to Marketing Cloud -> Apps -> Installed Packages
- Create an installed package with enhanced functionality, or navigate to an existing package created with enhanced functionality
- Under Components, click Add Component
- Select API Integration
- Select Server-to-Server integration type
- Define the scope properties for the integration the properties for the integration
- Save the component
Make note of the Client Id, Client Secret, and Authentication Base URI. Additionally if you don't already have it get the MID for the Business Unit. You must use the Enhanced functionality. This package will not work with legacy integration packages.
Fork the collection using the following button or follow the instructions listed below:
-
In Postman, click on the top search bar and type Salesforce
-
Click Salesforce Developers under Teams
-
Click the Salesforce Markting Cloud APIs tile
-
Click Fork
-
Enter a label for your fork (e.g.: “My fork”)
-
Select a workspace (the default “My Workspace” workspace is fine)
-
Click Fork Collection
The collection uses a series of collection variables to help streamline your calls. To successfully use the package it's important to be sure to update the collection variables.
- Click Salesforce Marketing Cloud APIs
- Open the Variables tab
- Complete the following variables for your instance by placing the values in the Current Value column. Instructions for collecting these details can be found in the Create an Installed Package in Marketing Cloud section
Variable | Example Value | Description |
---|---|---|
et_subdomain | 28yte38jw4un5gkoky2w6 | Tenant specific subdomain Authentication Base URI value. Only include the subdomain. |
et_clientId | kx2xo6o2updxf2anwquyg | Client Id |
et_clientSecret | gj38398t7g89nbqn58gtp | Client Secret |
et_mid | 14618743 | MID of business unit |
- Click Save.
The collection has been configured to automatically request an access token based on if a token is present or expired. This is accomplished by using the collection variables defined in the Configure the Collection section combined with a pre-request script.
The script creates two new variables:
- dne_tokenRefreshTime
- dne_etAccessToken
The Marketing Cloud authorization tokens are valid for 20 minutes therefore when a token is requested we create a new variable called dne_tokenRefreshTime that stores the time the token was generated. Each subsequent call will use this refresh time to determine if a new token should be requested.
The token returned in the authorization call is stored as the collection variable dne_etAccessToken. For REST calls, this token is passed in the authorization header defined by a pre-request script at the REST folder level. For SOAP calls the token is passed in the body of the SOAP envelope.
- Expand the collection and select the
Messaging & Journeys -> REST -> Address -> Validate Address
request - Click
Send
At this point, if your environment is correctly set up, you should see a 200 OK
status. This means that you have successfully authenticated with Salesforce Marketing Cloud and that you can now use the other collection’s requests.
See additional documentation for more information on how to keep the collection up to date and work with multiple Marketing Cloud instances.