# Webhook usecase

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwebhook-usecase%2F164297%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 23, 2025, 8:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwebhook-usecase%2F164297 "2025-07-23T20:15:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahul7star](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/rahul7star/32/46682_2.png) [@rahul7star](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Frahul7star)%5C
**Post date:** [July 23, 2025, 8:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwebhook-usecase%2F164297%2F1 "2025-07-23T20:15:08Z")

</div>

can i use webhook feature to pass a payload from space A to other space B . space B will read the data from payload and act on it ?

---

<div class="post-metadata">

**Author:** ![saurabhb-dev](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/saurabhb-dev/32/59139_2.png) [@saurabhb-dev](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsaurabhb-dev)%5C
**Post date:** [April 2, 2026, 6:25am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwebhook-usecase%2F164297%2F2 "2026-04-02T06:25:01Z")

</div>

**How to set this up:**

- **On Space B:** You need to build your Space so that it exposes a web endpoint. A common way to do this is using a **Docker Space** running a lightweight `FastAPI` server, or using the `@webhook_endpoint` decorator provided by the `huggingface_hub` Python library in a Gradio Space.

- **In your HF Settings:** You go to your user/organization Webhooks settings, select Space A as the “Target Repository,” and paste the Direct URL of Space B as the destination.

- **Security:** You configure a Webhook Secret in your settings and set that same secret as an Environment Variable in Space B. Space B’s code should verify the `X-Webhook-Secret` header so it only accepts requests from Hugging Face.
