I am trying to upload an image to slack and post it in an image block of a slack message to a specific channel.
- upload an image to Slack.
- make the image public with
files.sharedPublicURL
- check if the url is public:
public_url_shared
beingtrue
. - use the
permalink_public
I receive for the uploaded image for creating the slack message (an image block).
for debugging I am using Slack's Block Kit Builde. I am replacing the URL in the image_url
example of the block kit demo with the one I received from slack:
https://slack-files.com/T04AG7BVD-FLWHBHY86-1ba8263c00
or:
https://slack-files.com/T04AG7BVD-FLNJJURL1-7b17f26c80
The image should be shown. Instead there is the error in Slack's Block Kit Builder as well as a direct slack-api call: Downloading image failed.
If I open the permalink_public
in an incognito session. I can see the file. so it is public.