Search

Download File

Last Updated: Sep 13, 2021

Articles

Use this function to download a given file from slack server.

Syntax

Download File (token, file_id, file_path,)

Parameters

Input Parameter Name Description
token Authentication token
file_id ID of the file to be downloaded
file_path Path of the file to be downloaded

  • To know more about token, click here.
  • To view the Channel ID, right click on the channel name in the left menu and select Copy link in Slack. Paste in a text editor, the URL is of the format: https://<Slack URL>/<Channel ID>.

Returns

Return Value Description
Output
  • On Success returns 1 | File Downloaded Successfully
  • On Failure returns 0 | Error Message

Sample

Download File (xoxp-12QWERT, FID, C:/Invoices)

  • Uses token xoxp-12QWERT to authenticate connection to Slack, downloads the file with ID FID to the path C:/Invoices.
    Returns File Downloaded Successfully on downloading the file.

To view all the Slack functions, click here.

Did you find what you were looking for?