files.getUploadURLExternal
method
Welcome to the new home of Slack developer docs!
We're still building and not all features are available quite yet. Enjoy this peek into the future!
Not ready for the future? Return to the past at api.slack.com.
Usage info
This method gets a URL that can be used for uploading a file to share within channels. The URL allows clients to send file data to Slack's file upload service.
The workflow is as follows:
- Call
files.getUploadURLExternal
, which returns an upload URL and a file ID. - Upload a file by making a POST request to the upload URL. Include the filename (e.g.,
-F filename="@text.txt"
). Files are processed asynchronously via a job handler.- Files can be sent as raw bytes or can be multipart form encoded. Slack will return HTTP 200 if the upload is successful; a non-200 response indicates a failure.
- Call
files.completeUploadExternal
to finalize the upload.- There is no need to wait for files to be processed by the job handler; the
files.completeUploadExternal
method will return with no action until both processes have completed. Iffiles.completeUploadExternal
is not called, the upload will be aborted and clients will receive an error.
- There is no need to wait for files to be processed by the job handler; the