dimanche 29 novembre 2015

How to Get Sendgrid Subscription Tracking Settings using sendgrid_webapi gem?

I need to track subscription settings through Sendgrid using the following request mentioned here http://ift.tt/1Iu5HdH:

GET http://ift.tt/1Q7F705

I am trying to achieve the same using sendgrid_webapi gem using the query_api method.

client = SendGridWebApi::Client.new("user", "pass")
client.query_api("http://ift.tt/1Q7F705", {:data => 1})

which results in

{"errors"=>[{"field"=>nil, "message"=>"authorization required"}]}

I have added proper smtp_user_name and smtp_password, but it still shows the error. What more details need to be provided to get proper authorization?

Aucun commentaire:

Enregistrer un commentaire