Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

429 Too Many Requests when using pushover backend #3

Open
rsekman opened this issue Aug 28, 2024 · 0 comments · May be fixed by #4
Open

429 Too Many Requests when using pushover backend #3

rsekman opened this issue Aug 28, 2024 · 0 comments · May be fixed by #4

Comments

@rsekman
Copy link

rsekman commented Aug 28, 2024

Recently ntf has been failing with a 429 Too Many Requests error when using the pushover backend:

% ntf send Test
2024/08/28 03:26:51 pushover: 429 Too Many Requests

This is because the API token is hard-coded in the program

const PUSHOVER_API_TOKEN = "abughxjjtuofgt89bz21mibut67j5t"

and has reached its rate limit.

% curl -i "https://api.pushover.net/1/messages.json" --json '{"token": "abughxjjtuofgt89bz21mibut67j5t", "user": "u3obrzs9ix28uurzhku5nx2ixpcyw5", "title": "Test", "message": "testing"}' 
HTTP/2 429 
date: Wed, 28 Aug 2024 01:39:05 GMT
content-type: application/json; charset=utf-8
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
x-limit-app-limit: 10000
x-limit-app-remaining: -1
x-limit-app-reset: 1725166800
cache-control: no-cache
x-request-id: 1b9fb3e9-9a95-4834-b353-79dfeb0cdcfa
x-runtime: 0.010838
cf-cache-status: DYNAMIC
server: cloudflare
cf-ray: 8ba095e1099f95e2-ARN

{"token":"invalid","errors":["application has exceeded its monthly limit of 10000 messages, see https://support.pushover.net/i13"],"status":0,"request":"1b9fb3e9-9a95-4834-b353-79dfeb0cdcfa"}%
% date --date=@1725166800 
Sun  1 Sep 07:00:00 CEST 2024

Basically, all users of ntf send pushover notifications using the same API key and so share the same monthly quota of 10000 requests. To avoid this the program should at least allow, if not require, the user to set their own API key and so use their own quota of 10000 requests per month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant