Upload a file
Upload a single file and get the corresponding URI.
# 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(
curl -sSX POST https://zephyr.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: