Jun 07, 2013; 09:37
pavel
mailchimp single email address subscribe
Hi,
I'm revisiting some older problem with mailchimp. I'm stuck with this mailchimp subscribe. I think I have been looking at the code for too long and need some fresh set of eyes.
I have mailchimp.inc in lasso 9 startup folder (alternated version of Jason Hucks originally posted on SwapTag)
I have this simple code to subscribe one email address to email list in MC.
<?lasso
var('mychimp' = mailchimp(-key='xxxxxx7b116986cc10f89012fe84de-us6', -output='json'))
$mychimp->ping
$mychimp->lists
$mychimp->listSubscribe(
-apikey='xxxxxx7b116986cc10f89012fe84de-us6',
-id='9d8f6fec76',
-email_address='pavel@4000ft.com')
?>
Here is the return from the code above.
"Everything's Chimpy!"
{"total":1,"data":[{"id":"9d8f6fec76","web_id":55977,"name":"GFTH Members","date_created":"2013-01-06 18:11:36","email_type_option":true,"use_awesomebar":false,"default_from_name":"GetFreeTicketsHere.com","default_from_email":"news@getfreeticketshere.com","default_subject":"GFTH Newsletter","default_language":"en","list_rating":3.5,"subscribe_url_short":"http:\/\/eepurl.com\/vQcd5","subscribe_url_long":"http:\/\/GetFreeTicketsHere.us6.list-manage.com\/subscribe?u=xxxxxxxxb9285bffcdbbab2698&id=9d8f6fec76","beamer_address":"xxxxxxxxx2I5Mjg1YmZmY2RiYmFiMjY5OC0xOWIyNDZmYy05OGU2LTQ2N2MtYjI2Mi0xNTFlZmQ2ZmY0ZmY=@campaigns.mailchimp.com","visibility":"pub","stats":{"member_count":6720,"unsubscribe_count":576,"cleaned_count":281,"member_count_since_send":0,"unsubscribe_count_since_send":5,"cleaned_count_since_send":0,"campaign_count":34,"grouping_count":0,"group_count":0,"merge_var_count":6,"avg_sub_rate":0,"avg_unsub_rate":75,"target_sub_rate":138,"open_rate":11.832260144715,"click_rate":1.2
567367654963},"modules":[]}]}
{"error":"You must specify a id value for the listSubscribe method","code":-90}
First "Everything's Chimpy!"
No problem here, looks like lasso is getting answer from MailChimp API
Second block
No problem, I'm getting my list details (note the ID)
Third block
Error it is saying that I did not specify id for the list subscribe, but I did and it is the same id as the mailchimp api returns for the list I want to subscribe.
Any hints will be greatly appreciated.
Mac OSX 10.8, latest Lasso9.
Thanks, Pavel
#############################################################
Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Jun 07, 2013; 09:42
Jonathan Guthrie
Re: mailchimp single email address subscribe
Jun 07, 2013; 17:44
pavel
Re: mailchimp single email address subscribe
Jun 07, 2013; 16:42
Steve Piercy - Web Site Builder
Re: mailchimp single email address subscribe
Jun 08, 2013; 01:26
Steve Piercy - Web Site Builder
Re: mailchimp single email address subscribe