Using the token parameter in survey123

5715
18
Jump to solution
09-05-2020 01:54 PM
PaulSweeney3
Occasional Contributor III

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 

0 Kudos
18 Replies
CarlosRuano1
Esri Contributor

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.Error Survey

0 Kudos
PaulSweeney3
Occasional Contributor III

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. 

0 Kudos
CarlosRuano1
Esri Contributor

Hi @PaulSweeney3 

I add the survey url as you suggest and its works.

Regards,

Carlos

0 Kudos
PatrickHassett
New Contributor

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!

0 Kudos
PaulSweeney3
Occasional Contributor III

Hi @PatrickHassett 

How are you generating your token ? Can you elaborate on your process a bit more?

 

 

 

0 Kudos
PatrickHassett
New Contributor

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!

 

 

generate_token.PNG

0 Kudos
PaulSweeney3
Occasional Contributor III

Hi @PatrickHassett 

When you append it are you using the right parameter format (token=xxx)?

0 Kudos
PatrickHassett
New Contributor

Hi @PaulSweeney3 , here is the URL format that I am using:

https://survey123.arcgis.com/share/xxxxxx<ItemID>xxxxxxxx?portalUrl= https://<host>:<port>/portal&token=xxxxxxxxxxxx<token>xxxxxxxxxxxxxxxx

Thanks for your help

0 Kudos
PaulSweeney3
Occasional Contributor III

Hi @PatrickHassett 

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. 

0 Kudos