Hi All Can someone explain how the token parameter can be used to access secure surveys . My understanding is you can generate the token and use it to bypass the login screen but it does nt seem to work for me
Integrate with other apps—ArcGIS Survey123 | Documentation
Hi Paul,
Thanks for the details. I would not expect that to work for the Survey123 web form. As opposed to direct REST requests, the referrer would be important; that should be the survey123 web form. Additionally, if you are using a custom app, make sure that the survey123 website is listed in the list of valid redirect_uris.
Are you trying to access a survey through the web app?
Could you share the syntax you are using to try and access this survey?
Are you working with Portal for ArcGIS?
Where are you generating this token?
-Lynsey
Hi Lynsey
I am trying to access a web form which was created on survey123 connect. I generate the token in integromat using the HTTP module and the rest API to generate a token , then i generate an email with the following link embedded.
https://survey123.arcgis.com/share/xxxxxxxxxxxxxxxxx?mode=edit&globalId=xyz&token=xyz
i have tried it with the oath2 method using the client id and secret and it seems to open up the web form form for a second but it closes it straight away and i am met with the error message "The survey does not exist or is not accessible"
i then tried it using this method Generate Token—ArcGIS REST API | ArcGIS for Developers and it links to survey123 but the page just constantly refreshes
Can you provide details on the token generation? What are the parameters (referrer, etc.) you are using?
Hi James
I am using the following for the generate token
username=xyz
password=xyz
f=pjson
referer=https://www.arcgis.com
for the oath2 option i used the following
the token generates successfully for both and passes to the url i also have it working successfully in other scenarios to add features and update layers so i am pretty sure its the right way of doing it.
Hi James Tedrick
Thanks that appears to be working now. I updated the referer to the form url in option 1 above and it seems to be opening correctly now. In relation to the redirect uris for the second option I did nt try that yet but when I do I will try to provide an update.
Re visiting this again as i seem to have another issue, is there a reason the link i generate with the token would open in a mobile browser fine (on an android device) and not on a desktop browser. On the desktop it brings me to the arcgis online login screen and when i sign in the page just constantly refreshes the green survey123 loading bar with no end result . when i open the same link in my mobile device it works fine. I have tried it on multiple desktop browsers
Thanks
Hi I have the same problem, but I just happen two days ago, I have a custom app with token generation but suddenly, stop working and now only show me: The survey does not exist or is not accessible.
Could you help me??
Carlos Ruano Are you saying it only works for a mobile browser and not on the desktop ?
I have a private survey only share with my organization and I tried to access with the following url.
https://survey123.arcgis.com/share/2af631ece9db4467825ba20913a8021e?token=tokencreated
The token is created each time the survey is loading, the token is working because I use the same token to access the feature layer and it works.
The survey app token stop working on friday and I have using it for a while with out any problem. The problem happens in Desktop Web browsers and mobile browsers.
Hi Carlos Ruano
Did you try to make the referer the actual form url as opposed to just survey123 website? You are experiencing the same issue as me only I am seeing this behavior on the desktop browser my form loads fine on the mobile device.
Hi @PaulSweeney3 , @JamesTedrick,
Adding the survey URL to http referrers did not change the behavior, I am still being redirected to the authorization page whenever I use a link with my oauth2 generated token. Any advice or insights? Thank you so much!
Hi @PatrickHassett
How are you generating your token ? Can you elaborate on your process a bit more?
Hi @PaulSweeney3 , thanks for getting back to me. In the most simple application I would like to be able to use tokens generated from https://<host>:<port>/arcgis/sharing/rest/generateToken?, specifying the survey URL as the client as shown in the picture below, and manually append them to survey links before sharing them with survey respondents. Thanks for your help!
When you append it are you using the right parameter format (token=xyz)?
Hi @PaulSweeney3 , here is the URL format that I am using:
https://survey123.arcgis.com/share/xyz<ItemID>xyz?portalUrl= https://<host>:<port>/portal&token=xyz<token>xxxxxxxxxxxxxxxx
Thanks for your help
Sorry I cant definitively comment on launching surveys from a specific portal but the documentation does reference the following structure
@arcgis-survey123/?portalUrl=host.domain.com/webadaptor
@JamesTedrick would probably have more helpful advice then me on this one I would think.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.