# Webhook to pushover.net

**URL:** <https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863>\
**Category:** TTN Network and Services\
**Created:** [August 8, 2024, 5:10am UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863 "2024-08-08T05:10:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![indusa](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/i/848f3c/32.png) [@indusa](https://www.thethingsnetwork.org/forum/u/indusa)\
**Post date:** [August 8, 2024, 5:10am UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863/1 "2024-08-08T05:10:05Z")

</div>

Hi,  
I start new with Loro, TTN and webhook.  
now I like to reseive massages over [pushover.net](http://pushover.net).

But something is worng, I habe no iedear what 🙂  
Maybe someone an idear?  
Base URL: [https://api.pushover.net/1/messages.json](https://api.pushover.net/1/messages.json)

“data”: {  
“@type”: “[type.googleapis.com/ttn.lorawan.v3.ErrorDetails](http://type.googleapis.com/ttn.lorawan.v3.ErrorDetails)”,  
“namespace”: “pkg/applicationserver/io/web/sink”,  
“name”: “request”,  
“message\_format”: “request”,  
“attributes”: {  
“status\_code”: 400,  
“url”: “[https://api.pushover.net/1/messages.json](https://api.pushover.net/1/messages.json)”,  
“webhook\_id”: “pushover”  
},  
“correlation\_id”: “6b4a348543df4aceb7dc51e47dc6d942”,  
“code”: 14,  
“details”: [  
{  
“@type”: “[type.googleapis.com/google.protobuf.Struct](http://type.googleapis.com/google.protobuf.Struct)”,  
“value”: {  
“body”: "{"token":"invalid","errors":["application token must be supplied, see [https://pushover.net/api\“],\“status\”:0,\“request\”:\“919801de-61bb-4248-baa9-9988fd396a4c\”}”](https://pushover.net/api%5C%22%5D,%5C%22status%5C%22:0,%5C%22request%5C%22:%5C%22919801de-61bb-4248-baa9-9988fd396a4c%5C%22%7D%22)  
}  
}  
]

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [August 8, 2024, 9:08am UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863/2 "2024-08-08T09:08:52Z")

</div>

The error message, which should be formatted with the \</\> tool, tells you what the issue is - read it!

---

<div class="post-metadata">

**Author:** ![indusa](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/i/848f3c/32.png) [@indusa](https://www.thethingsnetwork.org/forum/u/indusa)\
**Post date:** [August 8, 2024, 9:55am UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863/3 "2024-08-08T09:55:40Z")

</div>

Hi @descartes ,

sorry what you mean with the \</\> tool.  
At the moment I test a forwarding with pipedream and change the header. That works.  
But i find no option inside the TTN webhooks to change the header.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [August 8, 2024, 10:39am UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863/4 "2024-08-08T10:39:17Z")

</div>

> [@indusa](#):
>
> But i find no option inside the TTN webhooks to change the header.

Sixth item down: `+ Add header entry`

---

<div class="post-metadata">

**Author:** ![indusa](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/i/848f3c/32.png) [@indusa](https://www.thethingsnetwork.org/forum/u/indusa)\
**Post date:** [August 8, 2024, 11:14am UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863/5 "2024-08-08T11:14:08Z")

</div>

Thanks a lot.  
I do that already, but TTN put it in a separate Header, push over need it in the body.  
If I change it in pipedream it works with this code:

import axios from ‘axios’

export default defineComponent({  
async run({steps, $}) {  
const { token, user } = steps.trigger.event.headers;  
const message = steps.trigger.event.headers.massage || “No message provided”;

```
const response = await axios.post('https://api.pushover.net/1/messages.json', {
  token,
  user,
  message
}, {
  headers: { 'Content-Type': 'application/json' }
});

return response.data;

```

},  
})

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [August 8, 2024, 6:07pm UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863/6 "2024-08-08T18:07:17Z")

</div>

> [@indusa](#):
>
> but TTN put it in a separate Header, push over need it in the body.

You said:

> [@indusa](#):
>
> But i find no option inside the TTN webhooks to change the header.

Still issues with using the \</\> tool. 🤷‍♂️

Pushover accepts a POST - it mentions JSON but provides no example. TTS sends the data as JSON with a header of `Content-Type:application/json` which I’m sure you already know from you using the various tools to see what gets sent.

TL;DR: You can’t, you need to setup an intermediary service.

And all that said, uplinks to a Push Notification are a bit of a hack. Your device should be sending periodic “I’m OK” messages which you don’t really need to know about - the intermediary service can send a Push when it **doesn’t** hear from the device on schedule.

---

<div class="post-metadata">

**Author:** ![indusa](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/i/848f3c/32.png) [@indusa](https://www.thethingsnetwork.org/forum/u/indusa)\
**Post date:** [August 9, 2024, 8:18am UTC](https://www.thethingsnetwork.org/forum/t/webhook-to-pushover-net/68863/7 "2024-08-09T08:18:50Z")

</div>

Many Thanks!
