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:
- 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. - 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