-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slash command endpoint #209
Comments
@evanhli All of the endpoints are configured to be the same for simplicity: If you'd like, you can optionally pass in your own endpoint(s) to the constructor using the const app = new App({
signingSecret: process.env.SLACK_SIGNING_SECRET,
token: process.env.SLACK_BOT_TOKEN,
endpoints: {
events: '/slack/events',
commands: '/slack/commands'
}
}); |
Thanks! |
This should be mentioned in the guide. I've faced the same issue as well. |
This is really should be mentioned in the guide. I met the same problem.
This is really really should be mentioned in the guide. |
+1 to others, please update the guide. For those encountering the same issue: Your code is likely correct - you need to update the Request URL of your slash command in app management to point to |
So..yes the docs now talk about this but it was extremely misleading still easy to gloss over, and confusing still coming from originally coding against the Slack API and not Bolt. I spent an hour trying to figure out and finally realizing this after coming across this issue which helped. I was coding against I suggest either: 1) Put an additional note to that effect in the beginning of the Actions section of the doc It's better to be explicit here. Stop the subtle difference between how Bolt treats the urls vs core Slack API patterns. There are some things you need to maintain consistency on and I think the core url pattern that you see most people setup in their API should be consistent with what we're putting in our incoming hooks value vs. events which are really two separate domain concepts. |
From the top, here's what worked for me: In the Slack Slash Commands page, set the request URL to ip:port/slack/events: Initialize your Bolt app as you would normally:
And then for simplicity, I use the app.client.chat.postMessage to craft my response. You can get the channel and everything else within the everything variable above. Hopefully this helps someone 🚀 |
@dginovker 's message should be on guide because many new developers will certainly struggle and it is not good for Slack |
@nurgasemetey for some reason the cc: @dginovker |
This is still a thing in 2023 |
Description
Hi, i've been trying to setup slash commands for a bot but can't seem to find the endpoint that the slash command is listening at.
I've copied the below from the example given by the docs:
In my slack app slash command config, I've created a new command at
https://localtunnel/echo
https://localtunnel/slack/command
https://localtunnel/slack/command/echo
https://localtunnel/slack/commands/echo
But I always get an error:
Darn - that slash command didn't work (error message: '404_client_error'). Manage the command at Test App.
Am I pointing at the wrong endpoint or is there something else going wrong?
Thanks
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)The text was updated successfully, but these errors were encountered: