Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Not Configured Android Google API Key

I am trying to use Youtube Data API v3 to search on android, though when I try to search using my API key i always get this message:

{
 "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."
 }
}

I have the Youtube Data API set to on in my Console. I have been trying to figure this out for hours. Does anyone know what's wrong?

like image 200
Timothy Logan Avatar asked Jan 19 '14 19:01

Timothy Logan


People also ask

How do I restrict API keys on Google Maps?

Go to the Google Maps Platform > Credentials page. Select the API key that you want to set a restriction on. The API key property page appears. Select Android apps. Click + Add package name and fingerprint.

How do I get an API key for Google Cloud Platform?

To get an API key: Visit the Google Cloud Platform Console. Click the project drop-down and select or create the project for which you want to add an API key. Click the menu button and select APIs & Services > Credentials. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key.

How do I restrict access to Google Maps SDK for Android?

Click Restrict key. Select Maps SDK for Android from Select APIs dropdown. If the Maps SDK for Android is not listed, you need to enable it. To finalize your changes, click Save. List existing keys. Clear existing restrictions on existing key. Set new restrictions on existing key.

How to get Google Maps API key from Android Studio?

Choose one of the following ways to get your API key from Android Studio: Copy the link provided in the google_maps_api.xml file and paste it into your browser. The link takes you to the Google Cloud Console and supplies the required information to the Cloud Console via URL parameters, thus reducing the manual input required from you.


2 Answers

A bit mind confusing is that for the YouTube Data API you need to use the browser-key, but for the YouTube Player API (for Android) you need the Android-key.

Using the Android key for the YouTube Data API will not work and result in the error you received.

like image 104
PieterAelse Avatar answered Nov 09 '22 02:11

PieterAelse


I've finally solved this. I deleted my project and created a new project in the old Cloud Console. I then activated all the APIs I need to use and then went into API Access and there was a key already there. It should say "Key for browser apps (with referers)" and I just used that key, and it works.

like image 35
Timothy Logan Avatar answered Nov 09 '22 03:11

Timothy Logan