Darn - that slash command didn't work (error message: `404_client_error`)

Viewed 2591

I am attempting to call a URI with my Slack slash command but I get the error:

https://pubsub.pubnub.com/v1/blocks/sub-key/sub-c-redacted/mypath

Darn - that slash command didn't work (error message: `404_client_error`). Manage the command at Freshdesk Field Update.

The URI I am trying to call works when I curl it (POST and GET) or just paste it in my browser address.

So I tried a webhook.site URI and it worked fine in the same slash command

https://webhook.site/404279dd-369b-4224-8672-94fa5c0a826c

And this works just fine. Unsure of why the PubNub URI is failing.

3 Answers

Unsure of why the error was occurring but seemed to have something to do with my PubNub Admin Dashboard account. I deleted it and created a new one and it started working with the new function in a new key set in a new account.

If anyone knows actual root cause (perhaps more generic issue than just PubNub account), please provide and I will review and approve as answer if I can verify it.

But for now, my answer is, try creating a new PubNub account.

You have to add template mapping in api gate way. In the integration section you can add it. So that the request from slack will properly map to json. Find examples here : here and here.

I was also getting the same error, when I was using localhost as the url but after I deployed the server, where slack sends the post request to now and got the url from there. the error is gone.

Related