We have set up a survey that shall send the survey data via webhook to FME Server. FME Server does receive the request from Survey123 but not the data. Debugging the communication in the web browser shows that the request is sent with Request Mode "OPTIONS".
Thanks for any help, best regards.
The OPTIONS request is a standard pre-flight (pre-submission) request to check for CORS compatibilit... You should see that the data is not sent, but should be following in a following POST request.
Same problem here. I have set up a webhook in Survey123. To test it, I created a webhook at https://webhook.site. When a new form is submitted, the webhook seems to be receiving just the OPTIONS request:
However, testing the same webhook with an online API testing tool (https://reqbin.com/) works fine, suggesting that the issue is from the source at Survey123 and not in the webhook:
I was having a problem with the survey123 webhooks on a simple custom https server to test getting a notification from the survey. My endpoint was working just fine if I accessed it through the browser or postman, but always failed when submitting a survey123. My endpoint is nearly identical to the one shown in ESRI's own example on github: https://github.com/Esri/webhooks-samples/tree/master/Developer/python/flask
The only error message survey123 gave me was "failed to fetch". My endpoint also showed only an OPTIONS request and no POST as I was expecting.
Some searching led me to suspect CORS was the issue (in my experience it's always a CORS issue), so I added the header
with the same failed results. Further searching finally led me to the final headers
Access-Control-Allow-Origin: https://survey123.arcgis.com Access-Control-Allow-Methods: POST, GET, OPTIONS Access-Control-Allow-Headers: Content-Type
and my endpoint could finally receive the POST request and json data payload from the survey123 webhook.
ESRI's help about survey123 webhooks says nothing about requiring these headers to be included when responding to the webhook's OPTIONS request!