Get channel's email address
GET https://wellesleycs240s26.zulipchat.com/api/v1/streams/{stream_id}/email_address
Get email address of a channel.
Note that only users with permission to post messages in the channel
can access the channel's email address.
Changes: Prior to Zulip 12.0 (feature level 448), users without
permission to post messages in the channel could access the channel's email
if they had metadata access.
New in Zulip 8.0 (feature level 226).
Usage examples
curl -sSX GET -G https://wellesleycs240s26.zulipchat.com/api/v1/streams/1/email_address \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode sender_id=1
Parameters
stream_id integer required in path
Example: 1
The ID of the channel to access.
sender_id integer optional
Example: 1
The ID of a user or bot which should appear as the sender when messages
are sent to the channel using the returned channel email address.
sender_id can be:
- ID of the current user.
- ID of the Email gateway bot. (Default value)
- ID of a bot owned by the current user.
Changes: New in Zulip 10.0 (feature level 335).
Previously, the sender was always Email gateway bot.
Response
Return values
Example response(s)
Changes: As of Zulip 7.0 (feature level 167), if any
parameters sent in the request are not supported by this
endpoint, a successful JSON response will include an
ignored_parameters_unsupported array.
A typical successful JSON response may look like:
{
"email": "test.af64447e9e39374841063747ade8e6b0.show-sender@testserver",
"msg": "",
"result": "success"
}
An example JSON response for when the requested channel does not exist,
or where the user does not have permission to access the target channel:
{
"code": "BAD_REQUEST",
"msg": "Invalid channel ID",
"result": "error"
}