Error while using Pushover

Describe the issue/error/question

I’m having a problem with triggering Pushover. I get the error below:

What is the error message (if any)?

{"context":{},"name":"NodeApiError","cause":{"name":"StatusCodeError","statusCode":400,"message":"400 - {\"token\":\"invalid\",\"errors\":[\"application token is invalid\"],\"status\":0,\"request\":\"b0a99065-7d0e-4ee1-a1ef-d03cb6169ff3\"}","error":{"token":"invalid","errors":["application token is invalid"],"status":0,"request":"b0a99065-7d0e-4ee1-a1ef-d03cb6169ff3"},"options":{"timeout":300000,"headers":{"Content-Type":"multipart/form-data"},"method":"POST","body":{"user":"[deprecated]","message":"Error: Example Workflow failed!","priority":-2,"url":"[deprecated]","token":"[deprecated]"},"qs":{},"url":"https://api.pushover.net/1/messages.json","json":true,"simple":true,"resolveWithFullResponse":false,"transform2xxOnly":false},"response":{"statusCode":400,"body":{"token":"invalid","errors":["application token is invalid"],"status":0,"request":"b0a99065-7d0e-4ee1-a1ef-d03cb6169ff3"},"headers":{"server":"nginx","date":"Wed, 21 Sep 2022 08:37:50 GMT","content-type":"application/json; charset=utf-8","transfer-encoding":"chunked","connection":"close","x-frame-options":"SAMEORIGIN","x-xss-protection":"1; mode=block","x-content-type-options":"nosniff","x-download-options":"noopen","x-permitted-cross-domain-policies":"none","referrer-policy":"strict-origin-when-cross-origin","access-control-allow-origin":"*","access-control-allow-methods":"POST, OPTIONS","access-control-allow-headers":"X-Requested-With, X-Prototype-Version, Origin, Accept, Content-Type, X-CSRF-Token, X-Pushover-App, Authorization","access-control-max-age":"1728000","cache-control":"no-cache","x-request-id":"b0a99065-7d0e-4ee1-a1ef-d03cb6169ff3","x-runtime":"0.005763"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"api.pushover.net","port":443,"hostname":"api.pushover.net","hash":null,"search":null,"query":null,"pathname":"/1/messages.json","path":"/1/messages.json","href":"https://api.pushover.net/1/messages.json"},"method":"POST","headers":{"Content-Type":"multipart/form-data","accept":"application/json","content-length":191}}}},"timestamp":1663749470874,"message":"Bad request - please check your parameters","node":{"parameters":{"resource":"message","operation":"push","userKey":"u3fcgbb9pcj5dw8tmuzzs4s5a4hccm","message":"=Error: {{$json[\"workflow\"][\"name\"]}} failed!","priority":-2,"additionalFields":{"url":"={{$json[\"execution\"][\"url\"]}}"}},"id":"9a7aa466-11ec-4d93-8c67-2f7ea08187c5","name":"Pushover","type":"n8n-nodes-base.pushover","typeVersion":1,"position":[240,100],"credentials":{"pushoverApi":{"id":"6","name":"Pushover account"}}},"httpCode":"400","description":"application token is invalid"}

I’ve tested my credentials with other methods and they have no problem.

Any ideas?

Hi @pepeday, I am sorry to hear you’re having trouble.

This error coming from Pushover does indeed suggest invalid credentials. I just gave the Pushover node a go on my own n8n instance and it seems to work as expected:

The push message arrived on my phone just a few seconds later.

Perhaps there’s simply a trailing or leading whitespace in the user key field of your node (or in the api token field in your credentials)?

This is very strange. I manually tested my credentials using an HTTP call and the credentials were working.
I double checked the error log and made sure there’s no trailing characters.
I could send you the node to try it out and let me know what you think?

Sure, if you’re happy with me to test in your account feel free to shoot me a DM :slight_smile: