summaryrefslogtreecommitdiffstats
path: root/examples/scopes/scopes.cs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/scopes/scopes.cs')
-rw-r--r--examples/scopes/scopes.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/scopes/scopes.cs b/examples/scopes/scopes.cs
new file mode 100644
index 0000000..c5a5c68
--- /dev/null
+++ b/examples/scopes/scopes.cs
@@ -0,0 +1,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.Body.ReadAsStringAsync().Result);
+Console.WriteLine(response.Headers.ToString());
+Console.ReadLine();
+