ts-npm-ytmusic-api icon indicating copy to clipboard operation
ts-npm-ytmusic-api copied to clipboard

[FEATURE]: OAuth integration

Open jstowey opened this issue 6 months ago • 0 comments

Is this feature request related to a problem? If so, please elaborate

Recently YouTube seems to have updated their endpoints to require a login when accessing Youtube Music from certain IP ranges. I have been using this package locally without issues, but when using it from a cloud provider, the queries often fail and return an error, with a message along the lines of "please sign in to make sure you're not a bot".

Tell me about the feature you are requesting!

Adding the ability to provide an access token when initializing the YTMusic object can solve the issue I've described.

I have forked this repo and added a basic solution, which will pass along the Authorization header, with a valid access token, but my implementation does not handle the OAuth within the package itself.

Maybe there's some scope to add this as a feature, as I'm sure this will be a problem for a number of users, when using this within a cloud hosting environment.

Additional Information

No response

jstowey avatar Aug 16 '24 08:08 jstowey