Skip to content

Instantly share code, notes, and snippets.

@apfister
Last active December 25, 2015 01:09
Show Gist options
  • Save apfister/6892749 to your computer and use it in GitHub Desktop.
Save apfister/6892749 to your computer and use it in GitHub Desktop.
request for trigger/list
esri.request({
url: 'https://geotrigger.arcgis.com/trigger/list',
headers: {
'Authorization' : 'Bearer <my super duper valid Access Token>'
}
}).then(
function (response) {
console.log(response);
}
);
@apfister
Copy link
Author

apfister commented Oct 8, 2013

this trigger/list request will fail with an invalid header value saying "OAuth 2.0 access_token is required"

@aaronpk
Copy link

aaronpk commented Oct 8, 2013

Missing word in the authorization header:

Authorization: Bearer XXXXXX

@apfister
Copy link
Author

apfister commented Oct 8, 2013

it throws the same error even with "Bearer" added. i also noticed that the Esri JS API is forcing the request through my proxy page. not sure if that matters.

@aaronpk
Copy link

aaronpk commented Oct 8, 2013

If it's going through your proxy page, then your proxy is probably not adding the authorization header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment