Select to view content in your preferred language

invalid clientId with Survey widget

3986
26
03-21-2020 04:15 AM
MatthiasDufour
Occasional Contributor

Hi

I am working on an Experience (built with developer edition) with a contact form created with the Survey widget.
With version Beta 2.0, the form worked correctly, but since the final version, the form no longer appears and indicates the message "invalid clientId".
I tried to create a new form, but the result is the same.
Thanks for your help.

26 Replies
DavidMartinez
Esri Regular Contributor

So are you saying in the developer edition there is no option to fit the container for you?  

Thanks,


David

0 Kudos
DaveFullerton
Frequent Contributor

I am at version 1.1 of the developer edition now.  The issue about getting no survey and just the text "invalid clientid" is still a problem if you download and deploy on your own web server.  For my purposes (a separate page for the survey), the embed widget workaround is probably going to be fine.

Oddly though, in the ExB interface when I embed the survey (first time trying this ever) I get a message that says, "Sorry, this content could not be embedded.  It may restrict the embedding of content from other sites."  In the published item and downloaded and deployed on my server versions the survey looks fine though.  I get the same message in the ArcGIS Online ExB too.

0 Kudos
DavidMartinez
Esri Regular Contributor

Hi Dave, good catch. For a downloaded experience, you will need to add the clientId property to the attributes object to the config.json on the root directory for your app. For example,

"attributes": {
"portalUrl": "https://experience.maps.arcgis.com",
"clientId": "yourclientid"
},

I will add this to the developer doc site. The next release will look at how we can improve dealing with the clientId, because I imagine most of us will not use the same clientId we are using with the dev edition. 

Cheers,

David

DaveFullerton
Frequent Contributor

I tried this David, but it didn't work for me.  I am testing this using an app that only has the Survey123 widget in it.  Just to be certain, have you updated the documentation yet?  It doesn't appear so.  If not, maybe you could let me know once you have.  Perhaps I am missing something.  I tried both using the AppID that I use for my ExB Developer Edition and tried an AppID from creating an application in my ArcGIS Online organizational account.

0 Kudos
DavidMartinez
Esri Regular Contributor

Hi Dave,

I think I understand your issue. Your experience is public correct and only contains a survey widget? There is no need for clientId at that point. I was able to reproduce the issue as well. I was adding a map widget and the survey widget together and not shared and that worked.  I am going to get with my colleagues who work on that widget to figure out the issue. 

Also forgot to mention, any updates we do on developer doc it is weekly since we can build the site on Thursdays. 

David

DaveFullerton
Frequent Contributor

Thanks, David.  Yes, my experience was downloaded and deployed (unzipped) on the root of our external web server,  and the survey being used by the survey widget was built using the Survey123 website, not in ExB.  The survey's form is at sharing level everyone (public).

0 Kudos
DaveFullerton
Frequent Contributor

Looks good now in v1.3.  Thanks!

0 Kudos