Webhook to pushover.net

Hi,
I start new with Loro, TTN and webhook.
now I like to reseive massages over pushover.net.

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

“data”: {
@type”: “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”,
“webhook_id”: “pushover”
},
“correlation_id”: “6b4a348543df4aceb7dc51e47dc6d942”,
“code”: 14,
“details”: [
{
@type”: “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\”}”
}
}
]

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

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.

Sixth item down: + Add header entry

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;

},
})

You said:

Still issues with using the </> tool. :man_shrugging:

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.

Many Thanks!