API Help - How to set the Access token in a variable
Learn how to set up the Postman application and leverage variables to save data into the variable for reusability purposes. You will also learn how to make your first Marketo Engage REST API call to get the access token.
PREREQUISITES
Before starting this video, create an API Only username with an AOI role and create a Launchpad service. Follow the steps in the articles below:
References used in this video:
-
Marketo auth endpoint:
{{{}base_url{}}}/identity/oauth/token?grant_type=client_credentials&client_id={{{}client_id{}}}&client_secret={{{}client_secret{}}}
-
JS script to grab acccess_token from the response body (places under the Scripts: tab):
var jsonData = pm.response.json();
pm.environment.set("access_token", jsonData.access_token);
recommendation-more-help
65ee5e5e-b058-48c8-aa13-bacc3d5848ce