Getting Error 403: Access Not Configured. Please use Google Developers Console to activate the API for your project

StackOverflow https://stackoverflow.com/questions/22870082

سؤال

I am trying to use the Youtube API to pull in all the videos from a particular channel. I set up the project in Google Developers Console and got an API browser key. I enabled YouTube Data API v3 and for safe measure, I enabled YouTube Analytics API.

I do not know what I am getting this error. Can anyone help me.

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

Code i'm using. It doesn't do anything yet, just try to fetch the data.

jQuery.getJSON('https://www.googleapis.com/youtube/v3/channels?part=UncleBens&id=UncleBens&key=AIzaSyDXD80S1mFHH2HSZFxLemkae-_Cl_nY5Xk', function(data){
    console.log(data);
    for(var i=0; i<data.data.items.length; i++) {
       console.log(data.data.items[i].title); // title
       console.log(data.data.items[i].description); // description
    }
});
هل كانت مفيدة؟

المحلول 2

Try setting the "Referers" to "Any referer allowed" for your project (just leave the field empty) in the Google Developers Console if it is not already like that.

To do this, go to your Google Developers Console and open API & Auth / Credentials and click "Edit allowed referers" empty the input field.

نصائح أخرى

You must enable a couple of API (in new google console) for things to work as expected.

Go to https://console.developers.google.com and make sure under "APIs" that you have following APIs enabled:

  1. "Contacts API"
  2. "Google+ API"

I faced the same issue. While I am not sure of the reason and logic behind this, but the following steps worked -

1) I left the referers field blank (Any referer allowed). However, this alone did not work. 2) I regenerated the browser key. That did the trick.

Hope this helps.

I've faced the same problem just this morning, but I was just trying to login with a google account. I was getting the same exact message.

What worked to me was to put ON this two APIs: Google+ API Contacts API

in your console: https://console.developers.google.com/project/your-project-id/apiui/api

I do not want to empty the "allowed referers field" as I prefer to have under control from where people can login to my app. I didn't have to change my API Key neither. Just for the records, I am using Spring Social Google 1.1.0

I had the same problem. I tried emptying the referral list, but that did not fix the problem. Then I regenerated the key. The new key gave an "expired key" error. So I reverted to the obsolete key, which now worked.

I encountered the same issue when I was using the Management API of Google Analytics. Here's what worked for me:

  1. Make sure the following APIs are enabled in your API console:

    • YouTube Data API v3
    • YouTube Analytics API
    • Contacts API
    • Google+ API
  2. Make sure the the scopes required by the API properly defined in your application. For Youtube, use scopes required to access API calls yuo

  3. Make sure the CLIENT_ID and CLIENT_SECRET of the Google Project in your API console are the correct ones defined in your client application.

Make sure that the 'Youtube Data API V3' is enabled for your project. You can find it under 'APIs & Auth' -> 'APIs'.
Also, after enabling the Youtube Data APIs for your project, wait for a minute before firing requests using the API key.

in api's and auth credentials in https://console.developers.google.com just leave the key for server applications Edit allowed ips empty this will work

If you use Public API access for action, you must to add your server ip to Allowed IPs list (Select Project -> APIs and Auth -> Credentials). If not, you will get an error as above: "Access Not Configured. Please use Google Developers Console to activate the API for your project."

Please view my attached file to view more enter image description here

You must enable a couple API's for things to work as expected.

First go to https://console.developers.google.com and make sure under "APIs" that you have the Contacts API and Google+ API enabled.

Once that is done you should no longer see that error message.

More can be found-

  1. https://github.com/zquestz/omniauth-google-oauth2/issues/111
  2. https://www.joomlapolis.com/forum/6-news-and-publicity/229505-configuring-cb-connect-7x#263260

I ran into this same issue and what worked for me was using a "Server Key" instead of a "Browser Key". Not sure why that would matter since I was making the request from a browser in both cases, but it works :)

Setting "Referers" to "Any referer allowed" for your project (just leave the field blank)

to goes your console (https://console.developers.google.com/project) and open Api & auth >> Credentials and click under the "Edit allowed referers" empty the input field. hard refresh the query

work Fine.

I faced the same issue and my problem was because I had different names in my project and Google APIs

This is an example with Android

    public MakeRequestTask(GoogleAccountCredential credential) {
            HttpTransport transport = AndroidHttp.newCompatibleTransport();
            JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
            mService = new com.google.api.services.calendar.Calendar.Builder(
                    transport, jsonFactory, credential)
                    .setApplicationName("Google Calendar API Example")
                    .build();
        }

Here the name is "Google Calendar API Example"

enter image description here

and the name in Google APIs is "App Example"

To resolve the problem I changed the name in my project to

        public MakeRequestTask(GoogleAccountCredential credential) {
            HttpTransport transport = AndroidHttp.newCompatibleTransport();
            JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
            mService = new com.google.api.services.calendar.Calendar.Builder(
                    transport, jsonFactory, credential)
                    .setApplicationName("App Example")
                    .build();
        }

Ok this is old but I figured this out for my case and I thought it might help others. I went to oauth and it seemed to resolve.

the real issue is that if you use an unrestricted key [and maybe, depepending on the api enabled] have a billing account linked; the api should work. If it works unrestricted, you are on the right track.

Once you restrict it to android it will fail again with that key until you sign your app. The easiest way i found was the use a signing config for the variants under android in the gradle file.

signingConfigs {
    debug {
        storeFile file("/users/xxxxxxxxxx/Android/keystores/google_demos/debugandroid.jks")
        storePassword "xxxxxxxxxx"
        keyAlias "com.example.xxxxxxxxxx"
        keyPassword "xxxxxxxx"
    }
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top