Passing parameters to sendgrid
Hi there,
I have setup (using the tutorial) the standard Sendgrid api and it works fine when I enter values directly into the service using the request tab. I have it setup with secure proxy.
I am however having problems sending when I use service execute command.
Can you please advise where I am going wrong:
Test.execute({"data": {"api_user": "{api_user_proxy}", "api_key": "{api_key_proxy}","to":"a href="mailto:Name1@gmail.com" rel="nofollow"Name1@gmail.com/a","from":"a href="mailto:Name2@gmail.com" rel="nofollow"Name2@gmail.com/a","subject":"Test email"}});
where SendGrid is the name of my service
It appears to be failing on the POST (400 bad request). I get the following error:
errors: ["Missing destination email"], message: "error"}
errors: ["Missing destination email"]
message: "error"
your help would be much appreciated.
THanks
James
the request payload looks like this
api_user=%7Bapi_user_proxy%7D&api_key=%7Bapi_key_proxy%7D&to=james.holman00%40gmail.com&from=james.holman00%40gmail.com&subject=Test+email