matrix-appservice-slack icon indicating copy to clipboard operation
matrix-appservice-slack copied to clipboard

New Slack Apps do not support as_user or RTM

Open Half-Shot opened this issue 5 years ago • 9 comments

We need to add documentation to explain to users how to create "Classic" Slack apps. We also need to support New Slack apps.

Half-Shot avatar Jan 23 '20 10:01 Half-Shot

:sob:

Cadair avatar Jan 23 '20 10:01 Cadair

Given:

New apps currently cannot override their username or icon when posting messages. That ability will arrive soon, and your app can request a new scope to enable it.

From https://api.slack.com/authentication/quickstart#soon I would propose we explicitly do not support "new" slack apps until that feature lands. RTM is obviously a shame, but we still have the events code which people can use if they want to use a new app for some reason.

Cadair avatar Jan 23 '20 10:01 Cadair

Hi there, I guess an explanation would be helpful. We currently run into

Feb-6 13:50:32.171 ERROR Main Failed processing matrix message:  { Error: An API error occurred: invalid_arguments
    at Object.platformErrorFromResult (/opt/matrix-appservice-slack/node_modules/@slack/web-api/dist/errors.js:50:33)
    at WebClient.apiCall (/opt/matrix-appservice-slack/node_modules/@slack/web-api/dist/WebClient.js:465:28)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 'slack_webapi_platform_error',
  data: 
   { ok: false,
     error: 'invalid_arguments',
     deprecated_argument: 'as_user',
     response_metadata: { scopes: [Array], acceptedScopes: [Array] } } }

Which totally sounds like it could be because of the changes made by slack. Do you guys have any pointers how to create a "classic" slack app?

ErrorProne avatar Feb 06 '20 13:02 ErrorProne

You can follow this link: https://api.slack.com/apps?new_classic_app=1

Cadair avatar Feb 06 '20 13:02 Cadair

Quickest response ever! Thank you, I'll try that out =)

Edit: Works like a charm!

ErrorProne avatar Feb 06 '20 13:02 ErrorProne

And under "App Home" you have to add a legacy bot user

Sorunome avatar Feb 10 '20 19:02 Sorunome

#356 adds a note to the README, but we still need to fix this.

Half-Shot avatar Feb 19 '20 14:02 Half-Shot

They do now have support for name and avatar though: https://api.slack.com/scopes/chat:write.customize (thanks @tulir )

Cadair avatar Mar 01 '20 13:03 Cadair

Ah awesome. Easy to fix then.

Half-Shot avatar Mar 01 '20 15:03 Half-Shot