While the variables are stored by default in the collection you can use Postman with environments to work with multiple Marketing Cloud instances in parallel.
The pre-request script has been written to determine if an environment has been selected. If it has been, the environment variables will be used for the authorization. By default in Postman the environment variables will supersede the collection level variables.
⚠️ Using environments means that you will store Marketing Cloud credentials in clear in Postman. Do this at your own risk.
-
Using a browser, sign up/in to Postman
-
Open the main collection with this link
-
Select the Environments tab (item A in following screenshot)
-
Click Salesforce Environment Template (B)
-
Click on the “three dots” icon on the right (C) and select Export from the menu
This downloads a
Marketing Cloud Template Environment.postman_environment.json
file. -
Close the browser tab. We'll continue the installation on the Postman app
-
In the Postman app, click Import
-
Drag and drop the JSON file you just downloaded in the gray zone
-
Click Import
-
Click on the Environments icon
-
Click on the “three dots” icon on the right of the environment template and select duplicate
This creates a
Marketing Cloud Template Environment Copy
template. -
Click Marketing Cloud Template Environment Copy
-
Rename the environment with something meaningful in relation with your Marketing Cloud instance (e.g.: “Playground 1”)
-
Set values in the CURRENT VALUE column for the following variables. If you need instructions for getting these variables go to: Create an Installed Package in Marketing Cloud
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 Update and close the environments dialog
-
Select your environment from the environment dropdown