docs icon indicating copy to clipboard operation
docs copied to clipboard

PHP Code generator broken, 403 bad request error

Open davidsbaldwin opened this issue 7 years ago • 3 comments

Expected content

Code generated by API documentation should work on our own server.

Actual content

Navigated to https://sendgrid.api-docs.io/v3.0/lists/get-all-lists. Entered API key generated with Full Access. Received 200 OK message on Documentation page. Copied generated PHP exactly as provided to .php file, uploaded to our server. When having navigated to that file, am receiving 403 Bad Request error. Code isn't changed in any way. API key is valid (generated another one to be sure, same result). Please contact via DM for private information to troubleshoot if needed.

Link to page: https://sendgrid.api-docs.io/v3.0/lists/get-all-lists

davidsbaldwin avatar Oct 09 '19 00:10 davidsbaldwin

Hi @davidsbaldwin,

Thanks so much for your feedback! We've added this to our internal docs backlog.

Twilio SendGrid Docs Team

Whatthefoxsays avatar Oct 17 '19 17:10 Whatthefoxsays

@davidsbaldwin

What version of PHP code did you use? Looking at the docs shows there are 3 different code examples.

kylearoberts avatar Oct 17 '19 22:10 kylearoberts

@kylearoberts The ext-curl PHP code. It works on the documentation page itself (thus API key must work), but the moment I take that identical PHP code to our server and execute it, I receive the 403 Bad Request error.

davidsbaldwin avatar Oct 18 '19 01:10 davidsbaldwin