
channel_not_found - I did provide an existing, correct channel ID and got this message. This was said in one of github bug reports by actual Slack employee. token - it cannot be a param of the post request, it must be a header. Things that were not working in the docs: I think that might be useful for you in the future. I just had a worst experience (probably of this year) with Slack's file.upload documentation. #'token': token, # Don't bother - it won't work. # it will still be uploaded to the Slack servers and you will get the link back 'channels': 'C123456', # somehow required if you want to share the file
# get a csv content, without actually creating a file. Code: from io import StringIO # this library will allow us to
This code can be used also to open an existing file, get it's content, modify and upload it to Slack. Because of various and not on point errors from the Slack API I wasted few hours to find out that in the end, I had good code from the beginning and simply missed a bot in the channel. I did try to create a new file and upload it to Slack, without actually creating a file (just having it's content). Writing this post, to potentially save you all the time I've wasted.