Closed hanslemm closed 6 months ago
👋 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.
Hi @hanslemm thanks for writing it 💯
Not sure I fully understand your issue, but it seems like you may be trying to retrieve a user_token
with a BOT id? if this is the case you should instead use the bot_token
provided by the OAuth handshake, there should be one for each workspace/team your application is installed in.
You should be able to post a message in a users DM using the bot_token
I just finished figuring out how to make my Slack App use the OAuth workflow.
I set up it using the
f"{my_app_url}/slack/install"
endpoint. I am using the standard Bolt OAuth Async class with no custom flow.The installation store is a custom one that I built using GCS - it has all the methods and attributes as the AWS one. I also checked the store, and it correctly has all the installations at user level, bot level, and installation without user/bot associated.
When sending a message to my bot through the App Home in Slack, messages tab, an error raises stating - correctly - that there is no installation found at
f"{workspace_path}/installer-{u_id}-latest"
, whereu_id
is the user id, which evaluates to the BOT user IDUXXXXXXXXXX
(I removed the alphanumeric to X).If I exchange messages with my bot app outside the App Home, no error raises - so it is related to the home app, messages tab.
I don't understand why the application is looking for an installation for the Bot user ID, shouldn't the application know that the bot user ID is the
bot
installation?Reproducible in:
The
slack_bolt
versionname : slack-bolt
version : 1.18.1
description : The Bolt Framework for Python
dependencies
Python runtime version
Python 3.11.6
OS info
ProductName: macOS ProductVersion: 14.2.1 BuildVersion: 23C71 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
Expected result:
The app shouldn't raise installation errors when using the messages tab of the App Home in Slack.
Actual result:
Mentioned in the introduction.
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.