Skip to content

[Feature request] API Keys #5227

@ggtylerr

Description

@ggtylerr

Is your feature request related to a problem? Please describe.
With the recent adoption of Anubis on my instance, Fjixu's, and on 420129, legitimate uses for the API (such as third-party clients) are now blocked. While video playback likely won't work anyways for the time being, it'd be nice to start offering support for it again, at least for other routes.

Describe the solution you'd like
Implement a way for Invidious to issue API keys (possibly using something similar to the authenticated routes) and add a config option to block any requests not using one. The host can then allow requests to /api/* and either use rate limiting or completely block any key making excessive requests.

Describe alternatives you've considered
It is also possible to allow multiple User-Agents via Anubis. AFAIK there's currently no app that would use a custom User-Agent header (FreeTube is currently considering one,) but it would be better than completely blocking API usage. The downside of this is that this alone would not be enough to deter bots - it is incredibly easy to use a fake User-Agent and bots regularly pose as browsers.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions