slack icon indicating copy to clipboard operation
slack copied to clipboard

November 12, 2025, support for files.upload API will be discontinued

Open VictorioBerra opened this issue 3 months ago • 5 comments

What happened

Slackbot :wave: Action required: Important notice about the files.upload API You are receiving this message because we have detected that your Rat Bot app has recently made a call to the files.upload API. We want to remind you that on November 12, 2025, support for this API will be discontinued. Please prepare for this change by moving away from using files.upload and instead use the combination of files.getUploadURLExternal and files.completeUploadExternal. More information on how to use these two APIs together can be found on our Working with files documentation. You can also leverage Slack's SDKs to help you transition to this new way of uploading files by visiting our api.slack page. If you choose to not take action before November 12, 2025, and your app continues to attempt to use files.upload, your app may break or become unusable. If you have questions about this change or need help, reach out to us at [email protected] and use the subject line files.upload API deprecation help. Note: This notification cannot be disabled. You'll continue receiving it until your app stops calling the method.

Versions

  • Go:
  • slack-go/slack:

Do we have support yet for:

https://docs.slack.dev/reference/methods/files.getUploadURLExternal/

and

https://docs.slack.dev/reference/methods/files.completeUploadExternal/

New process:

  • POST the contents of your file to the URL returned in step 1. This can be done by sending the raw bytes, or can be a multipart form ended request. If all went well, Slack will respond with an HTTP 200.
  • Call files.completeUploadExternal. You can optionally specify a sharing destination for your file or files using this API's arguments. This finalizes the file upload started in step 1.

VictorioBerra avatar Sep 23 '25 16:09 VictorioBerra

A little late, but the uploadFileV2 function uses the non-deprecated method.

Docs: https://pkg.go.dev/github.com/slack-go/slack#Client.UploadFileV2

calebmckay avatar Oct 31 '25 18:10 calebmckay

Thank you!

VictorioBerra avatar Nov 01 '25 13:11 VictorioBerra

Hi team, please allow me send a feedback on this function here:

I noticed FileSize in UploadFileV2Parameters is required: https://github.com/slack-go/slack/blob/3419af95ac5368a99d855e2ee739ae0f0953d53c/files.go#L172

What is the reason and is it possible to calculate the size automatically without asking user input?

yongzhang avatar Nov 19 '25 02:11 yongzhang

Hi @yongzhang

What is the reason and is it possible to calculate the size automatically without asking user input?

This is a requirement of the slack API - which makes sense from an API point of view.

In this library, we do try to make it as easy as possible to interface with the Slack API, but it's always a trade-off on how much to do on behalf of the user.

This is one where I think it's ok for the user to extract the size of the file and pass it into the library.

nlopes avatar Nov 19 '25 10:11 nlopes

Yeah for me it was trivial: FileSize: len(content) where content is just a string.

which makes sense from an API point of view.

I am curious though, how does this make sense? Maybe this is a protection from someone messing with the content?

VictorioBerra avatar Nov 19 '25 16:11 VictorioBerra