AnsweredAssumed Answered

How do I get an "access_token" after signing in with OAuth?

Question asked by mstayner@utilisync.com on Jul 27, 2018
Latest reply on Aug 2, 2018 by mstayner@utilisync.com

We need to get an "access_token" so we can load private data after signing in using OAuth/AGOL user. How can we do that? 

 

We have a workflow that works for our web app, it is as follows:

  1. In order to get the token, we hit the endpoint at {host}/sharing/rest/oauth2/token, and as parameters we send the client_id, the code, the redirect_url, and the grant_type of authorization_code.
  2. The returned object has an access_token and a refresh_token, which we retrieve from the returned object.

 

We see information like esri username and organization ID after we sign in, but no access_token. We also don't see a code, so we can't request it like we do in our web app.

 

Any help would be appreciated!

 

Thanks,

 

Matt 

Outcomes