Closed rastro-dev closed 2 years ago
I found the issue and it seems that there is a problem with the example code. All I had to do is change the documentation and tests example from "response = sg.client.contactdb.lists.get()" to "response = sg.client.marketing.lists.get()". The unfortunate part is that this issue is present in the python, php and ruby docs.
Issue Summary
Hi there, this is my first github issue, so please bear with me. Anyhow I am getting "python_http_client.exceptions.ForbiddenError: HTTP Error 403: Forbidden" when I use the sendgrid client to hit marketing api endpoints. I can use the same key to all Email related endpoints just fine. I can also use curl on the marketing api endpoints with the same key and they all work. I can also use the same key on this page for example "https://sendgrid.api-docs.io/v3.0/lists/get-all-lists" and it will work fine. So I know its not the key. I have also tried to load the key either through environment var or directly passed to the constructor - Neither worked. I am hoping that someone might have an idea as to what I am missing here. Thanks
Code Snippet
Here is an example of using a code snippet from the libs examples.
Exception/Log
Technical details: