Created
October 13, 2015 16:45
-
-
Save thinkingserious/c342272e77d973dbaf94 to your computer and use it in GitHub Desktop.
SendGrid PHP v3 API Keys Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
require 'lib/SendGrid.php'; | |
require 'lib/Client.php'; | |
Dotenv::load(__DIR__); | |
$sendgrid_apikey = getenv('SG_KEY'); | |
$sendgrid = new Client($sendgrid_apikey); | |
$response = $sendgrid->api_keys->get(); | |
print("Status Code: " . $response->getStatusCode() . "\n"); | |
print("Body: " . $response->getBody() . "\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment