Re: [madmimidev] Add Audience List Member doesn't work for Lists with spaces in the name (C#)

66 views
Skip to first unread message

Dustin

unread,
Jul 30, 2012, 12:29:32 PM7/30/12
to madmi...@googlegroups.com
Hey Mike,

Dustin here.  Thanks for getting in touch about this.  I'll get it over to our developers to have a look at and they'll get back to you about it ASAP.  

Cheers!
Dustin

On Sun, Jul 29, 2012 at 7:55 PM, mlieser13 <mlie...@googlemail.com> wrote:
Hi,

if i add a new subscriber to an existing list with a space in the list name, it doesn't work:

/audience_lists/{name_of_list}/add?email={email_to_add} [POST]

Server response: 

The remote server returned an error: (400) Bad Request.


When the list has no space in it, everything is working. i do url encode the List Name before i send it with .net function. Other characters are ok. The list Test%"$List works, but spaces are failing.

i checked the url i requested: https://madmimi.com/audience_lists/Test+List/add

space = +, not %20

after replacing it with %20 everything is fine. maybe a could idea to check these "+" signs at your side?

finally: string.Format("https://madmimi.com/audience_lists/{0}/add", HttpUtility.UrlEncode(ListName).Replace("+","%20")

I don't use the "official" .net wrapper, because it doesn't support custom fields while adding a subscriber...

Best
Mike

btw: I guess thats the reason why any other email marketing service uses ids for lists, instead of names as an identifier... i like ids :) and why do we need to pass a username, when an api key is still present? sorry, don't understand that... at the API part mad mimi isn't easier than mailchimp or campaign monitor. sorry!



--
Dustin at Mad Mimi
Simple. Lovely. Email Marketing.
http://madmimi.com
http://twitter.com/madmimi

Reply all
Reply to author
Forward
0 new messages