Upload a file
Upload a single file and get the corresponding URI.
Initially, only you will be able to access the link. To share the
uploaded file, you'll need to send a message
containing the resulting link. Users who can already access the link
can reshare it with other users by sending additional Zulip messages
containing the link.
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Upload a file
with open(path_to_file, 'rb') as fp:
result = client.call_endpoint(
"content": "Check out [this picture](%s) of my castle!" % (result['uri'],)
curl -sSX POST https://yourZulipDomain.zulipchat.com/api/v1/user_uploads \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
As described above, the file to upload must be provided in the
Maximum file size
The maximum file size for uploads can be configured by the
administrator of the Zulip server by setting
in the server's settings.
uri: The URI of the uploaded file.
A typical successful JSON response may look like: