sendgrid-python icon indicating copy to clipboard operation
sendgrid-python copied to clipboard

Example of using the new Single Sends function?

Open danielghurley opened this issue 5 years ago • 4 comments

Hi, is there a minimal example of using the Single Sends function through Python3? I'm having some trouble with authentication issues to do with verified Sender IDs and suppression groups, and it would really help to see some skeleton code for a working example.

danielghurley avatar Jul 11 '20 05:07 danielghurley

Hello @danielghurley,

This documentation combined with this should hopefully get you started.

I will leave this issue open so that we may create an official working example. Pull requests and +1s on the issue summary will help it move up the backlog.

With best regards,

Elmer

thinkingserious avatar Jul 14 '20 21:07 thinkingserious

Thanks, I've got an HTTP version with requests working at the moment, although I'd like to use the python library if possible. I assume that the syntax following the existing examples would be something like:

response = sg.client.marketing.singlesends.post(some_object)

Is that about right? Which helper objects, if any, would be appropriate to use with the Single Sends endpoint?

On Wed, 15 Jul 2020 at 09:50, Elmer Thomas [email protected] wrote:

Hello @danielghurley https://github.com/danielghurley,

This documentation https://sendgrid.api-docs.io/v3.0/single-sends/create-single-send combined with this https://github.com/sendgrid/sendgrid-python/blob/master/USAGE.md should hopefully get you started.

I will leave this issue open so that we may create an official working example. Pull requests and +1s on the issue summary will help it move up the backlog.

With best regards,

Elmer

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sendgrid/sendgrid-python/issues/922#issuecomment-658431153, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW6G3ZTEDVAZMU77CDKF6TR3THITANCNFSM4OXEXTVA .

danielghurley avatar Jul 15 '20 04:07 danielghurley

I would like to provide a minimal working example and work on this issue, can you help to figure out which documentation should I add it to?

hack3r-0m avatar Oct 01 '20 18:10 hack3r-0m

Think a new marketing folder with an example should be added here: https://github.com/sendgrid/sendgrid-python/tree/main/examples

childish-sambino avatar Oct 02 '20 15:10 childish-sambino