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 ?
1 Like
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
FastAPIserver, or using the@webhook_endpointdecorator provided by thehuggingface_hubPython 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-Secretheader so it only accepts requests from Hugging Face.
1 Like