# How to use webhook?

**URL:** <https://community.homey.app/t/how-to-use-webhook/49445>\
**Category:** Developers\
**Created:** [July 15, 2021, 3:27am UTC](https://community.homey.app/t/how-to-use-webhook/49445 "2021-07-15T03:27:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_67](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom_67/32/34026_2.png) [@Tom\_67](https://community.homey.app/u/Tom_67)\
**Post date:** [July 15, 2021, 3:27am UTC](https://community.homey.app/t/how-to-use-webhook/49445/1 "2021-07-15T03:27:14Z")

</div>

Hi all, I have a camera. When I want to trigger a flow when there is a motion detection . I followed the webhook document to the third step… But I don’t know where this ‘device-api’ comes from. Do I need to implement it myself?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/f/0f85dd098eae16a1e6021b16c84296dfa1116e59.png)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 15, 2021, 5:45am UTC](https://community.homey.app/t/how-to-use-webhook/49445/2 "2021-07-15T05:45:22Z")

</div>

What they mean is that if your device has its own API that you can use to register a webhook with, this is how to use it. If not, you need to look at one of the other options.

---

<div class="post-metadata">

**Author:** ![Tom\_67](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom_67/32/34026_2.png) [@Tom\_67](https://community.homey.app/u/Tom_67)\
**Post date:** [July 15, 2021, 5:59am UTC](https://community.homey.app/t/how-to-use-webhook/49445/3 "2021-07-15T05:59:03Z")

</div>

Thank you, I think I understand. In the registerHook method, I need to register the url to my device, and then execute the ‘createWebhook’ method

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 15, 2021, 6:04am UTC](https://community.homey.app/t/how-to-use-webhook/49445/4 "2021-07-15T06:04:36Z")

</div>

Just out of curiosity: why are you creating a full app? From what it sounds like, all you need is for your camera to call a particular URL when motion is detected. If so, you can do that with just flows: there’s a Logic card _“IF is received”_, which will get triggered if you request a particular URL (`https://<homey-cloud-id>.connect.athom.com/api/manager/logic/webhook/<event>?tag=<tag>`).

---

<div class="post-metadata">

**Author:** ![Tom\_67](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom_67/32/34026_2.png) [@Tom\_67](https://community.homey.app/u/Tom_67)\
**Post date:** [July 15, 2021, 6:25am UTC](https://community.homey.app/t/how-to-use-webhook/49445/5 "2021-07-15T06:25:56Z")

</div>

Haha, because I want my app to have an event flow card instead of setting it up by the user…

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 15, 2021, 6:56am UTC](https://community.homey.app/t/how-to-use-webhook/49445/6 "2021-07-15T06:56:36Z")

</div>

Oh right, I thought you were just making an app for yourself 😅
