qbit / node-pushover

Pushover notifications for node.js (JavaScript,NodeJS)
ISC License
163 stars 24 forks source link

token error #4

Closed nofear87 closed 10 years ago

nofear87 commented 10 years ago

I always get the Error: application token is invalid. With node-pushovers module it works...so it cant be the token. Are there any ideas? Thanks! Robert

qbit commented 10 years ago

Without seeing how you are using it I can't really give ideas. Is it possible for me to see your code?

nofear87 commented 10 years ago

I used the code out of your test.js. I only copy paste it.

qbit commented 10 years ago

Do you have the 'PUSHOVER_USER' and 'PUSHOVER_TOKEN' environment variables set?

nofear87 commented 10 years ago

Yes sure i have replaced it. With the node-pushover module it works fine.

qbit commented 10 years ago

If you mean you replaced PUSHOVER_USER or PUSHOVER_TOKEN in the script, then you don't have the exact copy/paste file. If you have the exact file from test/test.js simply setting environment variables form your shell with let the test script pick them up.

Example:

$ export PUSHOVER_USER=<YOURPUSHOVERKEY>
$ export PUSHOVER_TOKE=<YOUPUSHOVERTOKEN>
$ node tests/test.js
error undefined
result {"status":1,"request":"a348b41df96c2acbf3a02b090c598893"}
$
nofear87 commented 10 years ago

You are right. Sorry, I don't realized the prozess.env function ;-) Thank you very much!