When populating a survey using web form url parameters, we are receiving a "Invalid redirect_uri Error: 400". We have a Survey123 edit form which we launch via custom link to pre-populate the form using web form URL parameters gathered from an existing feature service. Staff launch the edit survey by clicking on the link from an internal experience builder lookup, so they are logged into our ArcGIS Online organization. Through removal of parameters and special characters in the links we determined the error is being caused by the @ symbol in the values being sent to an email field. Additionally, the error only occurs if the staff launching the survey have not authenticated to survey123.arcgis.com before to attempting to use the link containing parameters. If the email field is null or the user has authenticated to the survey123.arcgis.com web form already the error does not occur. We only confirmed this on the web browser and did not test the windows desktop app nor mobile apps. Can someone confirm if this is a bug or are we missing something? We were able to overcome the issue (with an undesirable hack), by embedding a blank Survey123 form hidden behind another frame in the experience builder app. This automatically authenticates staff to survey123.arcgis.com before they launch a survey with web form parameters.
Thanks for following up @JamesTedrick .
We are not encoding the link for users, but the redirect (as shown in the attached image) is encoding the @ character as %40. An example of our original link is: https:://survey123.arcgis.com/share/437eac8e2d174d0a94a05629bc7b3358?open=menu&field:Email_Addressemail@example.com
The encoded redirect is: https%3A%2F%2Fsurvey123.arcgis.com%2Fshare%2F437eac8e2d174d0a94a05629bc7b3358%3Ffield%3AEmail_Address%3amesser%40mt.gov
We tested encoding the @ symbol when troubleshooting and it did not solve the issue. For example we tried: "https:://survey123.arcgis.com/share/437eac8e2d174d0a94a05629bc7b3358?open=menu&field:Email_Address=amesser%40mt.gov" . We also tried encoding everything after the ? for our full url with all questions. The only thing that worked was getting rid of all @ and all %40 references or ensuring the user had authenticated to survey123.arcgis.com.
To be clear, this works as expected on a public survey where no authentication is required such as: https://survey123.arcgis.com/share/3feb26125dbc427ea0aec090e7f55b4b?open=menu&field:Hunter=Adam Messer&field:Phone_Number=406-555-5555&field:Email_Addressfirstname.lastname@example.org