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
Post a Comment