slackapi / node-slack-sdk

Slack Developer Kit for Node.js

Home Page:https://slack.dev/node-slack-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update files.upload Documentation on Slack API Website for files.uploadV2

OODemi52 opened this issue · comments

I'm not entirely sure if this is the right place to make this issue, but when looking into documentation about the files.upload, the website only has relevant information for the original files.upload method and not the files.uploadV2 method. Since it seems Slack is encouraging developers to use the file.uploadV2 method, it might be helpful to update the documentation on the website concerning the method, how to use it, a sample response, etc. Thank you!

List any relevant URLs

Thank you so much for taking the time to send this feedback! Indeed, the api document page should have links to v2 information such as https://slack.dev/node-slack-sdk/web-api#upload-a-file and https://slack.dev/python-slack-sdk/web/index.html#files

I will talk to the team maintaining the site.

Hi @seratch I tried using uploadV2 method but my channels cannot be found unlike v1 where I would not need to write my channel id. Can I ask if such capabilities of using channel name instead of channel id be added? the original v1 allows for channel name and channel id. Can I ask this capability be replicated?

@caramelmelmel Unfortunately, there is no plan to enable developers to pass a channel name instead of channel ID to the v2 API endpoints. Only long-lived APIs such as chat.postMessage and files.upload allow channel name as the parameter to specify what the channel is. A channel name can be renamed at any time, therefore it's not robust enough for long term maintenance. For this reason, newer endpoints accept only channel IDs and that's the same for the v2 file uploading functionality. I understand this is not convenient for you, but it'd be appreciated if you could understand this.

These documents were updated on the API site. Closing.