Search code examples
slack-apislack

How to get/enable public URL for media uploaded to slack using slack API


I'm using slack api to upload media to a public channel, in-response I'm getting different urls for the uploaded media including 'permalink_pulic' which seems as the public URL, but that link doesn't work.Other Links are only accessible by slack team members.

Is there any way we can enable those public_link, so that media can be accessible outside slack.


Solution

  • In general Slack files are not public, but you can open public access to them if you want.

    Call the method files.sharedPublicURL after you uploaded it to enable public access to a Slack file via its permalink_public URL.

    See API documentation for more info.