Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is google oauth2 playground failing to return data?

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

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

and receiving this response:

{
  "error": {
    "code": 403, 
    "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.", 
    "errors": [
      {
        "domain": "usageLimits", 
        "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.", 
        "reason": "accessNotConfigured"
      }
    ]
  }
}

on the authorization tab I requested access to all yoututbe v3 api scopes and I granted access upon request. I'm assuming I'm forming the query parameters wrong perhaps? I'm new to oauth and how anything about it works.

like image 385
Daniel Robinson Avatar asked Oct 17 '25 11:10

Daniel Robinson


1 Answers

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

like image 148
Emily Avatar answered Oct 19 '25 06:10

Emily