Fetch an API key (production)
This API endpoint is used by clients such as the Zulip mobile and
terminal apps to implement password-based authentication. Given the
user's Zulip login credentials, it returns a Zulip API key that the client
can use to make requests as the user.
This endpoint is only useful for Zulip servers/organizations with
EmailAuthBackend or LDAPAuthBackend enabled.
The Zulip mobile apps also support SSO/social authentication (GitHub
auth, Google auth, SAML, etc.) that does not use this endpoint. Instead,
the mobile apps reuse the web login flow passing the
a webview, and the credentials are returned to the app (encrypted) via a redirect
Note: If you signed up using passwordless authentication and
never had a password, you can reset your password.
See the API keys documentation for
more details on how to download API key manually.
In a Zulip development environment,
see also the unauthenticated variant.
curl -sSX POST https://salsa.zulipchat.com/api/v1/fetch_api_key \
--data-urlencode firstname.lastname@example.org \
username string required
The username to be used for authentication (typically, the email
address, but depending on configuration, it could be an LDAP username).
require_email_format_usernames parameter documented in
GET /server_settings for details.
password string required
The user's Zulip password (or LDAP password, if LDAP authentication is in use).
A typical successful JSON response may look like: