summaryrefslogtreecommitdiffstats
path: root/examples/scopes/scopes.js
blob: e9187e40fdf6032d4723edad52e4e6648fd2bf8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var sg = require('sendgrid')(process.env.SENDGRID_API_KEY)

///////////////////////////////////////////////////
// Retrieve a list of scopes for which this user has access.
// GET /scopes


var request = sg.emptyRequest()
request.method = 'GET'
request.path = '/v3/scopes'
sg.API(request, function (error, response) {
  console.log(response.statusCode)
  console.log(response.body)
  console.log(response.headers)
})