Bolt throws a 401 error when slack hits the events endpoint
Description
I have a simple slack bot built with slack bolt -- I have tested it locally with the bot + appToken and it works totally fine. However, when the app/bot is in a production environment with the prod install options configuration it fails with an unAuth error.
What type of issue is this? (place an x in one of the [ ])
- [x] bug
- [ ] enhancement (feature request)
- [ ] question
- [ ] documentation related
- [ ] example code related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Reproducible in:
package version: 3.11.1
node version: v16.16
OS version(s): Macos 12.4
Steps to reproduce:
Not applicable
Expected result:
I expected it to authenticate and call the /slack/events endpoint with no issues
Actual result:
Bolt responds with a 401 (unauthorized) error
Attachments:
Error logs: (Slack makes an api request to https://myBotEndpoint.com/slack/events and it throws a 401 -- because it is unauthorized slack decides to not call any listeners and as a result the Bot will not function as expected)

- Note the "[ERROR] bolt-app Error: No installation data found" and "[WARN] bolt-app Authorization of incoming event did not succeed. No listeners will be called" logs.
App config code:

Additional Notes
- My app config code is identical to the example(s) found here in the docs: https://slack.dev/bolt-js/concepts#authenticating-oauth
- Slack seams to also retry timed out requests -- I understand there is a way to disable this using a header value however, I cant seam to be able to access response headers within the bolt framework
- I am not on an outdated/deprecated version of slack bolt and I still have this issue
- All keys, redirect Urls, and scopes are all configured correctly and the issue still continues to occur
- The app runs fine in a debug/dev environment with the dev app config code seen bellow:
[UPDATE] - I was able to fix this issue but still having problems with the slack retries.
Info
- I have a message listener that listens for incoming messages
- Slack seams to retry events that take more than 3 seconds - this results in multiple duplicated events
- I am aware that there is a way to turn of the "graceful retries" according to this doc: https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events:~:text=know%20why%20yet.-,Turning%20retries%20off,-If%20your%20server -- however, how is this done in bolt? (I have seen no way to even access headers to begin with)
Hi @darren-pieces! BoltJS doesn't currently allow for setting additional headers, but we appreciate you bringing it up as it will help inform our work on allowing header changes going forward. In the meantime, to work around this limitation, we suggest you create your own receiver. You can find documentation on how to do that here and an example is provided here.
That said, setting the header to turn off retries is not recommended. Doing so means that your application will lose all event data should any temporary interruption occur with your application.
We hope this information is helpful. Let us know if this resolves your issue!
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.
As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.