python - Mandrill Validation error: Please enter an array -
i'm tyring utilize mandrill
on google app engine
, python
, , i'm using urlfetch
module, provided google.
the adaptation of code i'm using following:
#the jmessage below split formatting below create easier follow
#the real code doesn't have such indentation issues
jmessage = { "key": mailchimp_key, "message": { "track_clicks": false, "track_opens": true, "tags": [], "google_analytics_domains": [], "html": message_html, "subject": "reset password", "from_name": none, "merge_var_map": {}, "auto_text": false, "from_email": from_email, "headers": {}, "google_analytics_campaign": [], "merge_vars": [], "text": none, "global_merge_vars": [], "url_strip_qs":false, "to": [ { "email": to_email, "name": none } ] } } headers = {'content-type': 'application/json'} result = urlfetch.fetch(url='https://mandrillapp.com/api/1.0/messages/send.json',\ headers=headers, payload=json.dumps(jmessage), method=urlfetch.post) print result.content
the output following:
{"status":"error","code":-2,"name":"validationerror","message":"validation error{\"message\":\"please come in array\"}"}
what array wants? unsure on do, wrapped "message" key, jmessage
with []
, making list. indeed, stopped complaining array, output []
, , didn't receive email.
python google-app-engine mandrill urlfetch
No comments:
Post a Comment