Access Not Configured. Please use Google Developers Console to activate the API for your project for youtube search list

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

Question

i implement youtube search list from Youtube Search List

but coming this error

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

Code:-

youtube = new YouTube.Builder(transport,jsonFactory, new HttpRequestInitializer() 
{
    @Override
    public void initialize(HttpRequest request) throws IOException {
    }
}).setApplicationName("youtube-cmdline-search-sample").build();


String queryTerm = getInputQuery();

// Define the API request for retrieving search results.
YouTube.Search.List search = youtube.search().list("id,snippet");

// Set your developer key from the Google Developers Console for

String apiKey = ""; //i have server key and browser key
search.setKey(apiKey);
search.setQ(queryTerm);

search.setType("video");

search.setFields("items(id/kind,id/videoId,snippet/title,snippet/thumbnails/default/url)");
search.setMaxResults(NUMBER_OF_VIDEOS_RETURNED);

enter image description here

Was it helpful?

Solution

Solution:-

I created project from here old developer console site.

I used browser key from Old developer console site.

OTHER TIPS

I had the same problem. I disabled the API and then re-enabled it and then it worked.

You need to activate your google api for the youtube application. By logging into Google Developers account. Select API and a list of all google api's should be listed you need to enable the youtube api and paste in the api access key associated with your account.

// Set your developer key from the Google Developers Console for

String apiKey = ""; //i have server key and browser key
search.setKey(apiKey);
search.setQ(queryTerm)

Have you ensured that in your Developers Console, the field for referrers is empty?

I received this error when I created a "Server Key" and the IP I whitelisted didn't match the the client's IP (where I ran the application).

Wow! Yes, use the Old Developers Console. I worked all day on this before I finally found this answer. On the New Developers Console there's a link to the old one. Generate a new key in the old console and it'll work! This sucks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top