Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

429 Too Many Requests when using pushover backend #3

@rsekman

Description

@rsekman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions