php - How can i get campaign's web id when campaign is created using API in Mailchimp? -


i using api version 1.3 of mailchimp create campaign programmatically in php.

i using mcapi class method campaigncreate() create campaign. campaign created , returns campaign id in response string.

but need web id (integer value of campaign id) can use open campaign using link on website.

for example: lets want redirect user link - https://us8.admin.mailchimp.com/campaigns/show?id=941117 , need id value 941117 when new campaign created.for getting string 6ae9ikag when new campaign created using mailchimp api

please let me know if knows how campaign web id (integer value) using mailchimp api in php

thanks

i found answer wanted share here.hope helps someone

i campaign id string when createcampaign() method of mcapi class used.

you need use below code web id (integer value of campaign id)

$filters['campaign_id'] = $campaign_id;  // string value of campaign id $campaign = $api->campaigns($filters); $web_id = $campaign['data'][0]['web_id']; 

this worked me.

thanks


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -