sendgrid / sendgrid-python

The Official Twilio SendGrid Python API Library
https://sendgrid.com
MIT License
1.55k stars 714 forks source link

Examples using legacy marketing API don't work for new users #897

Open tagawa opened 4 years ago

tagawa commented 4 years ago

Issue Summary

New SendGrid users don't have access to the legacy marketing API so examples using that API don't work, for example contactdb.py. There may be others too, e.g. campaigns.py and senders.py.

Steps to Reproduce

  1. Run any of the code examples in examples/contactdb/contactdb.py with an account that doesn't have access to the legacy marketing API.
  2. Also try code in some of the other examples, e.g. campaigns, sender

Exception/Log

Error returned:

python_http_client.exceptions.ForbiddenError

Technical details:

jeneesmith1 commented 4 years ago

I noticed that this the contactsdb seems to be outdated, and I noticed that replacing most of the references to contactsdb with "marketing" made the calls work. I hope that this can be worked on soon!

eshanholtz commented 4 years ago

Hi @tagawa

The examples for this library are auto-generated from the API spec, which hasn't been done since the legacy marketing API was migrated to the new marketing campaigns API. We're aware the issue, but don't currently have a timeline for when an update will be made. Pull requests to add an example are welcome and will be reviewed based on priority.

tagawa commented 4 years ago

Ah, thanks for the update @eshanholtz, I hadn't realised they were auto-generated. I haven't been able to get everything working for me yet to be able to send pull requests.

2Clutch commented 3 years ago

Would it be possible to have a separate documentation, even if temporary, with the updated endpoints for new users? In examples/contactdb/contactdb.py, there could 2 API calls defined for each endpoint:

I've been running into a lot of issues, and even the support team at SendGrid hasn't been able to help me because they're following the current documentation.

This is frustrating because I find myself spending a lot of time doing things manually that could easily be automated via the API.

nickmccullum commented 3 years ago

I echo this sentiment. We use Sendgrid to send certain transaction emails and the lack of API documentation for the new endpoints has made development very difficult. Is there a timeline for the release of the new documentation?