Remote Files

Learn to use Slack's API calls to manipulate remote files in the workspace.

Overview

Similar to the local file API, Slack offers a remote file API as well. We use this API to add and manipulate remote files.

Let’s look at the following endpoints in this lesson:

  1. files.remote.add: This endpoint adds a file from a remote service.
  2. files.remote.share: This endpoint shares a remote file into a channel.
  3. files.remote.update: This endpoint updates an existing remote file.
  4. files.remote.info: This endpoint retrieves information about a remote file added to Slack.
  5. files.remote.list: This endpoint retrieves information about a remote file added to Slack.
  6. files.remote.remove: This endpoint removes a remote file.

Add a remote file

To add a remote file, we access the https://slack.com/api/files.remote.add endpoint. With this endpoint, we’ll add a remote document. We must first add a remote file before sharing it in a chat. You can make a new Google document by going to this link: doc.new. Copy the shareable link of the Google document, and paste it into the coding widget below.

Note: If you are not a Google user, you can use any other remote file URL.

Some important query parameters for the files.remote.add endpoint are the following:

Get hands-on with 1400+ tech skills courses.