summaryrefslogtreecommitdiffstats
path: root/examples/scopes/scopes.cs
blob: 53d8bd588d6cec638d380a55144a0f69776f8164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;
using SendGrid.Helpers.Mail; // If you are using the Mail Helper

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.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();