Recently, I've been created Slack Bot using GAS. And then when I configured Event Subscription in the Slack using a URL of GAS for deployment on the Slack, I got the error "Your URL didn't respond with the value of the challenge
parameter.".Please refer to image about the error below.
Error "Your URl didn't respond with the value of the challenge
parameter."
Deployment configuration display in the GAS
I already tried making the URl for new deployment in the GAS, and then re-configured it to the Event Subscription in the Slack.
When you add a URL in Slack they will verify that the URL is valid, they do that by sending a JSON payload to your URL first, you have to reply back with the value you received from Slack in the field "challenge".
So workflow goes like this:
You enter a URL in Slack Slack sends a "verification" payload to that URL Whatever you have on that URL needs to receive that payload and read the field challenge Replay in one of several ways back to Slack with the value of challenge. Slack will receive back that value and validate your function.
I'm not sure how often this happens but after I validate it I haven't gotten this request again (yet).
You can see in the picture you've sent hat the payload Slack sent to verify the URL is with the following format: Slack->Your URL: "body":{ "type":"url_verification", "token":"some value goes in here", "challenge":"some random numbers and letters go here as well" }
and you need to reply with any of the following formats (Json, plain text, or x-www-form-urlencoded) You->Slack { "challenge":"same value you received" }
or
"same value you received" (yeah, just plain text, not quotes)
or
challenge="same value you received"
Help for the url_verification is here https://api.slack.com/events/url_verification
Let me know if you need anything else for this.