Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Fetching Marketing Cloud Visitor ID in API


Level 2

Hello everyone,

We have a use case where we have integrated Target and analytics audience to deliver content through delivery API. For this request, we need to pass the marketing cloud visitor ID in API request alongwith the customer ID to fetch the relevant target content. But currently we are reading the MCID from the web and using it in API. We want to dynamically fetch the mcid in API request.  We are currently using Postman application for the API requests. We tried using the getMarketingCloudVisitorID function in the pre-request script to populate the mcid; but it does not works and throws error.

Can anyone please suggest a way to dynamically fetch the MCID in Target API through the pre-request scripts or some other modifications that we can make in the API request?

Thanks in advance.



0 Replies