Sendgrid-php: message":"Permission denied,

Created on 28 Jul 2016  路  6Comments  路  Source: sendgrid/sendgrid-php

401HTTP/1.1 401 Unauthorized Server: nginx Date: Thu, 28 Jul 2016 21:13:42 GMT Content-Type: application/json Content-Length: 88 Connection: keep-alive X-Frame-Options: DENY {"errors":[{"message":"Permission denied, wrong credentials","field":null,"help":null}]}

whats is the problem ??

question

Most helpful comment

problem fixed..
please change example
$apiKey = getenv('SENDGRID_API_KEY') to $apiKey = 'SENDGRID_API_KEY';

All 6 comments

problem fixed..
please change example
$apiKey = getenv('SENDGRID_API_KEY') to $apiKey = 'SENDGRID_API_KEY';

Hi @Powerin10,

Thank you for reaching out to us!

We have purposefully created the example using environment variables to discourage people from putting their API keys directly in their code. This practice has resulted in leaked keys in GitHub.

Please see: https://github.com/sendgrid/sendgrid-php/blob/master/TROUBLESHOOTING.md#environment-variables-and-your-sendgrid-api-key

Thanks!

Thanks

Working... Thanks

Thank's a lot.
$apiKey = getenv('SENDGRID_API_KEY') to $apiKey = 'SENDGRID_API_KEY';
solve my problem.

Thank's a lot. My problem has been solved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jverlee picture jverlee  路  4Comments

elshafey picture elshafey  路  4Comments

rainman0607 picture rainman0607  路  4Comments

FilipLukac picture FilipLukac  路  4Comments

mwsasser picture mwsasser  路  3Comments