Giter Club home page Giter Club logo

Comments (8)

adripo avatar adripo commented on July 21, 2024 3

Nevermind, I found out the issue.

The API key used in this project exceeded request quota. I get the following response if I do the request with the default api key:

{
  "error": {
    "code": 403,
    "message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
    "errors": [
      {
        "message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
        "domain": "youtube.quota",
        "reason": "quotaExceeded"
      }
    ]
  }
}

I think the best solution should be to allow users to use their own api key, maybe by adding a textbox in the preferences. what do you think?

from aimpyoutube.

cloewen8 avatar cloewen8 commented on July 21, 2024 1

without touching client_id or client_secret

In testing I noticed some calls would not work unless the OAuth and key where from the same projects. In those cases I'd have to use the build-in key (I'm providing an option to supply a custom client).

from aimpyoutube.

adripo avatar adripo commented on July 21, 2024

I did some fast tests and the problem is the missing API key in the request.

I enabled YouTube Data API v3 from here https://console.cloud.google.com/marketplace/product/google/youtube.googleapis.com
and generated a YouTube API key for public access, then appended it to the url
https://www.googleapis.com/youtube/v3/videos?part=contentDetails%2Csnippet&hl=en&id=2ZSHzwkeGSI &key=[KEY]

It returned the expected info.

Can this api be generated by accessing with my own youtube account from the preferences?

from aimpyoutube.

cloewen8 avatar cloewen8 commented on July 21, 2024

I think the best solution should be to allow users to use their own api key, maybe by adding a textbox in the preferences. what do you think?

I'm working on a pull request for this. Did you ever end up looking into this further?

I noticed all of the endpoints I could find that use the API key, could instead use an OAuth 2.0 token. The plugin even uses OAuth already in some places. If this was to spread out the API quota allowance, I would imagine more of the API requests would be cached, but caching is prevented entirely (Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n).

Edit: Did more research, did not realize OAuth and the API Key used the same quota. I can absolutely add a Key field to options, including the Client ID and Secret for OAuth (not sure if having the same client and a different key would set off Google security).

from aimpyoutube.

adripo avatar adripo commented on July 21, 2024

@cloewen8 I temporary solved the issue by manually generating an api key on my account and changing it in the dll.

This is the value that I replaced in mine, without touching client_id or client_secret:
https://github.com/AdrianEddy/AIMPYouTube/blob/master/Config.h#L13

from aimpyoutube.

AdrianEddy avatar AdrianEddy commented on July 21, 2024

I recompiled from latest master, but I haven't checked it, I don't use AIMP anymore
Please check and let me know if it works
aimp_YouTube_v1.8.zip

from aimpyoutube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.