Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
api-docs: Add authorization header section to http-headers article.
Lauryn Menard99bbc26e4be7
diff --git a/api_docs/http-headers.md b/api_docs/http-headers.mdindex 858c8d40b9f..16949b603eb 100644--- a/api_docs/http-headers.md+++ b/api_docs/http-headers.md@@ -2,16 +2,29 @@This page documents the HTTP headers used by the Zulip API.+!!! tip ""++ The `curl` example on each endpoint's documentation page, details+ the request format. You can access curl's documentation at `man curl`.++## The `Authorization` header+Most important is that API clients authenticate to the server usingHTTP Basic authentication. If you're using the official [Python orJavaScript bindings](/api/installation-instructions), this is takencare of when you configure said bindings.-Otherwise, see the `curl` example on each endpoint's documentation-page, which details the request format.+Otherwise, to authenticate an API request:++- Use HTTP Basic authentication, which is described [here][mdn-auth-headers].+ This means sending an HTTP header named Authorization, with your+ credentials [in a certain format][mdn-basic-auth].++- For your credentials in HTTP Basic authentication, use a bot's email+ as the "username" and its [API key](/api/api-keys) as the "password".+ In the `curl` example for each endpoint, this is shown as:-Documented below are additional HTTP headers and header conventions-generally used by Zulip:+ `-u BOT_EMAIL_ADDRESS:BOT_API_KEY`.## The `User-Agent` header@@ -79,3 +92,5 @@ limit.[rate-limiting-rules]: https://zulip.readthedocs.io/en/latest/production/securing-your-zulip-server.html#rate-limiting[integrations-channel]: https://chat.zulip.org/#narrow/channel/127-integrations/+[mdn-auth-headers]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Authorization+[mdn-basic-auth]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Authorization#basic_authentication_2