HI,
I'm trying to generate a token to apply to an AWAB application URL hosted via an ArcGIS Online organisation so that I can provide an AGOL AWAB to a group of external users. Via Portal I'd use the GenerateToken option via the Portal sharing API, i.e. https://{portalname}/portal/sharing/generateToken, giving me something like URL&token=abcdefg....
Is this doable via an AGOL organisation?
Thanks in advance.
Hi Mark,
This isn't recommended as any user can then use the token to access any part of your organization, data, users, functionality as you. This could potentially be a large security hole.
If you are looking to share your application, consider sharing the application publicly or creating a group and sharing the app, data and web map only with the group of users that should access it. They will require an ArcGIS Online account in order to use this security method.
Here is a link to some developer Authentication help:
Get an access token | ArcGIS for Developers
-Kelly
Hi @KellyGerrow
We can get token with https://www.arcgis.com/sharing/generateToken by POST method and following format of parameters: f=json&username=USERNAME&password=PASSWORD&client=requestip
But when use that token to query a hosted Survey123 result feature service on https://services3.arcgis.com, got following error: {"error":{"code":498,"message":"Invalid token.","details":["Invalid token."]}}
Any help? Thanks.