Skip to content
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

What token is required to use the RTM client? #250

Open
orange-puff opened this issue Dec 2, 2022 · 5 comments
Open

What token is required to use the RTM client? #250

orange-puff opened this issue Dec 2, 2022 · 5 comments

Comments

@orange-puff
Copy link

From various tutorials, it seems that the current bot setup supported by slack is to create an app and a bot, each of which have a token. The SlackRtmClient, and I've tried both my bot and app token and neither seem to work.

I end up with
Exception in thread "main" slack.api.ApiError: not_allowed_token_type

@mccartney
Copy link
Collaborator

mccartney commented Dec 16, 2022

I think there are several types allowed.
At one place I am using a Custom Integrations | Bot | API Token. Its value starts with xoxb-. But from what I remember, this has been deprecated in Slack.

At another place I don't have admin, so I cannot check.

Does anyone know?

@mccartney
Copy link
Collaborator

mccartney commented Dec 16, 2022

The docs for https://api.slack.com/methods/rtm.connect say name two options:

User tokens
Legacy bot tokens bot

So the Legacy bot token is probably my usage. Then the other answer is "User token" which I have little experience with.

@orange-puff
Copy link
Author

Would you be open to adding a socket mode client to this library?
https://api.slack.com/start/planning/choosing
I could look into adding this. Without going into any detail, the docs say Socket Mode is preferred to RTM

@mccartney
Copy link
Collaborator

mccartney commented Dec 18, 2022

That'd be a great contribution. Feel free to proceed. Please consult if you want to add new non trivial dependencies. Which I guess is likely for sockets.

@orange-puff
Copy link
Author

orange-puff commented Dec 18, 2022

Thanks. My understanding is the RTM client starts a websocket connection with slack. If so, the SocketMode client would do something very similar. It actually also requires a websocket connection, not just a normal socket connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants