Upload a custom emoji
This endpoint is used to upload a custom emoji for use in the user's
organization. Access to this endpoint depends on the
organization's configuration.
POST https://chat.convergenceservices.in/api/v1/realm/emoji/<emoji_name>
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Upload a custom emoji; assume `emoji_path` is the path to your image.
fp = open(emoji_path, 'rb')
emoji_name = 'my_custom_emoji'
result = client.call_endpoint(
'realm/emoji/{}'.format(emoji_name),
method='POST',
files=[fp]
)
print(result)
curl https://chat.convergenceservices.in/api/v1/realm/emoji/<emoji_name> \
-F "data=@/path/to/img.png" \
-u USER_EMAIL:API_KEY
Arguments
As described above, the image file to upload must be provided in the
request's body.
Emoji name
The emoji name can only contain letters, numbers, dashes, and spaces.
Upper and lower case letters are treated the same, and underscores (_)
are treated the same as spaces (consistent with how the uKnowva Messenger UI
handles emoji).
Maximum file size
The maximum file size for uploads can be configured by the
administrator of the uKnowva Messenger server by setting MAX_EMOJI_FILE_SIZE
in the server's settings. MAX_EMOJI_FILE_SIZE
defaults
to 5MB.
Response
Example response
A typical successful JSON response may look like:
{
"msg": "",
"result": "success"
}