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 ??
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.
Most helpful comment
problem fixed..
please change example
$apiKey = getenv('SENDGRID_API_KEY') to $apiKey = 'SENDGRID_API_KEY';