I am trying to create a webhook for a sheet in Smartsheet (https://www.smartsheet.com/ ). API documentation on webhooks can be found here: https://smartsheet-platform.github.io/api-docs/?shell#creating-a-webhook
As you can see in the diagram for creating a webhook, the webhook needs to be enabled after creation: this is where I'm having a problem and need some help! The "subscriber" (the callback URL, which for my test case I'm using a topic posted to FME cloud) has to respond with a 200 status and also echo back a "challenge" random number that comes in the response header by including it in the response header "Smartsheet-Hook-Response". Or it can respond with a json that contains this value in "smartsheetHookResponse" attribute.
As you can see above, when I try to enable the webhook, the callback URL is triggering the topic (all good here; two attempts shown above). The highlighted string is what I need to return (step #5 of the image in the API documentation linked above). If Smartsheet doesn't receive this, the webhook is not enabled.
The problem I'm having is twofold:
- The topic is responding with a 202 status, so it is failing;
- I don't know how to respond back with the correct header or json response
How can I have the topic send the appropriate response back so the webhook can be enabled? Thanks for any help on this! PS: below is the response body I get in FME when I try to enable the webhook via an HTTPcaller).