Files
zulip/zerver/webhooks/helloworld/doc.md
Anders Kaseorg a58a71ef43 Remove Ubuntu 18.04 support.
As a consequence:

• Bump minimum supported Python version to 3.7.
• Move Vagrant environment to Debian 10, which has Python 3.7.
• Move CI frontend tests to Debian 10.
• Move production build test to Debian 10.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-21 17:26:14 -08:00

1.4 KiB

Learn how Zulip integrations work with this simple Hello World example!

This webhook is Zulip's official example integration.

  1. The Hello World webhook will use the test stream, which is by default in the Zulip dev environment. If you are running Zulip in production, you should make sure that this stream exists.

  2. Next, on your {{ settings_html|safe }}, create a Hello World bot. the URL for the Hello World bot using the API key and stream name:

    {{ api_url }}/v1/external/helloworld?api_key=abcdefgh&stream=test

  3. To trigger a notification using this webhook, you can use send_webhook_fixture_message from a Zulip development environment:

    (zulip-py3-venv) vagrant@debian-10:/srv/zulip$
    ./manage.py send_webhook_fixture_message \
    > --fixture=zerver/tests/fixtures/helloworld/hello.json \
    > '--url=http://localhost:9991/api/v1/external/helloworld?api_key=&lt;api_key&gt;'
    

    Or, use curl:

    curl -X POST -H "Content-Type: application/json" -d '{ "featured_title":"Marilyn Monroe", "featured_url":"https://en.wikipedia.org/wiki/Marilyn_Monroe" }' http://localhost:9991/api/v1/external/helloworld\?api_key\=&lt;api_key&gt;
    

{!congrats.md!}