Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thinkingserious/b0996cd929a5232e8c35 to your computer and use it in GitHub Desktop.
Save thinkingserious/b0996cd929a5232e8c35 to your computer and use it in GitHub Desktop.
SendGrid PHP v3 ASM Groups GET Example
<?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->asm_groups->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