blob: e4bab6d0bc45abcb768e5de0311810b113edbec7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
using System;
using SendGrid.Helpers.Mail;
using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
##################################################
# Retrieve a list of scopes for which this user has access. #
# GET /scopes #
dynamic response = sg.client.scopes.get();
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
Console.WriteLine(response.ResponseHeaders.ToString());
Console.ReadLine();
|