why is google oauth2 playground failing to return data?

前端 未结 2 1982
梦毁少年i
梦毁少年i 2021-01-21 08:10

I\'m learning oauth2 using the google playground, I\'m trying this request:

https://www.googleapis.com/youtube/v3/activities?part=snippet

and r

相关标签:
2条回答
  • 2021-01-21 08:52

    I believe you need to use your own oauth clientID and secret for this particular API in the playground. If you click on the gear button on the right top corner and click the check mark on "Use your own credential" in the playground, you should be able to enter yours.

    enter image description here

    You can get your own OAuth credential by following the instruction here: https://developers.google.com/youtube/registering_an_application

    Oh make sure you name your application and provide email under the APIS & AUTH ->Consent screen in the Developer console when you first create you OAuth credential for your project.

    And there is one thing missing in your query as well... you need specify a filter as well. See if you can at least get this one working:

    GET https://www.googleapis.com/youtube/v3/activities?part=snippet&home=true

    0 讨论(0)
  • 2021-01-21 09:01

    I had the same issue, and before I found your question I had posted mine

    Apparently Google hadn't enabled the Youtube Analytics API for the default/demo credentials in the oAuthPlayground, which is now enabled, see the accepted answer in the link

    https://stackoverflow.com/a/33462959/2473413

    0 讨论(0)
提交回复
热议问题