-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot upload file to Channel using Api #1575
Comments
Hi @nobikin95 - I noticed that the successful output has |
Hi @srajiang, output for the files.completeUploadExternal :
|
It seems like I'm having an issue with channel_id, here is the code I'm using:
|
The cause of your confusion may not be related to this, but the One way to determine if the upload operation is finished is to check if the "shares" property is available in the file's metadata. You can verify this by polling the |
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized. |
I've been stumped by this api. My file gets uploaded and I've set the channel_id but it still is not seeing it in the channel. From the documentation it seems like the file should show up in the channel but perhaps that is not the case? calling
I get this response:
Using {
"ok": true,
"file": {
"id": "xxxxxxxxxx",
"created": 1733998180,
"timestamp": 1733998180,
"name": "Galaxy Book Pro.pdf",
"title": "Galaxy Book Pro.pdf",
"mimetype": "",
"filetype": "",
"pretty_type": "",
"user": "xxxxxxxxxx",
"user_team": "xxxxxxxx",
"editable": false,
"size": 45061,
"mode": "hosted",
"is_external": false,
"external_type": "",
"is_public": false,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
"url_private": "https://files.slack.com/files-pri/xxxxxxx-xxxxxxx/galaxy_book_pro.pdf",
"url_private_download": "https://files.slack.com/files-pri/xxxxxxxx-xxxxxxxx/download/galaxy_book_pro.pdf",
"media_display_type": "unknown",
"permalink": "https://X.slack.com/files/xxxxxxxxxx/xxxxxxxx/galaxy_book_pro.pdf",
"permalink_public": "https://slack-files.com/xxxxxxxxx-xxxxxxxx-xxxxxx",
"favorites": [],
"is_starred": false,
"shares": {},
"channels": [],
"groups": [],
"ims": [],
"has_more_shares": false,
"has_rich_preview": false,
"file_access": "visible",
"comments_count": 0
},
"comments": [],
"response_metadata": {
"next_cursor": ""
}
} Note: I've redacted ids |
I am trying to upload a file to a private Slack channel using the Slack API via the following Python script.
However, once uploaded, the file cannot be downloaded by users in the channel. I am looking for help to understand why this is happening and how to resolve it.
Python runtime version
3.12.1
I used these step:
Actual result:
The text was updated successfully, but these errors were encountered: