Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access not configured YouTube API

I am attempting to add the ability to view certain videos from YouTube into an iOS app I am creating. I have an API key from Google and have enabled the YouTube API from the Developer Console, as comments are suggesting. This is not the issue.

I have a very simple method that collects the details of a specific YouTube channel from it's ID which I will then use to find all of that channels uploaded videos. The issue I'm having is it says my Access is not Configured. Here is everything I have done:

The method to grab the information (obviously I haven't included my key or the channel ID there):

- (void)collectChannelData {

GTLServiceYouTube *service = [[GTLServiceYouTube alloc] init];
service.APIKey = @"API_KEY";
GTLQueryYouTube *query = [GTLQueryYouTube queryForChannelsListWithPart:@"contentDetails"];
query.channelId = @"CHANNEL_ID";

GTLServiceTicket *ticket = [service executeQuery:query completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) {
    if (!error) {
        GTLYouTubeChannelListResponse *channelItem = object;
        NSLog(@"%@", channelItem);
    } else {
        NSLog(@"%@", error);
    }
}];  }

I have ensured the the YouTube Data API v3 has been switched on in the Google Developer Console, and the Bundle Identifier matches what is in my Info.plist

The error message I receive is:

Error Domain=com.google.GTLJSONRPCErrorDomain Code=403 "The operation couldn’t be completed. (Access Not Configured. Please use Google Developers Console to activate the API for your project.)" UserInfo=0xa3aa0e0 {error=Access Not Configured. Please use Google Developers Console to activate the API for your project., GTLStructuredError=GTLErrorObject 0x8a74630: {message:"Access Not Configured. Please use Google Developers Console to activate the API for your project." code:403 data:[1]}, NSLocalizedFailureReason=(Access Not Configured. Please use Google Developers Console to activate the API for your project.)}

I cannot find any reason why this would not work. I believe I am correct in that I should not need to set up a billing account or need oAuth for this specific request. I can also see in the overview for my app on the Developer Console that multiple requests have been received but there is an error for each request. I just can't figure out why it's rejecting it.

Thanks for any help.

like image 535
tizaks Avatar asked Feb 03 '14 04:02

tizaks


1 Answers

There is a known issue with Bundle identifier, please omit it for now, and it should work.

You can track the issue here: https://code.google.com/p/gdata-issues/issues/detail?id=5770

like image 100
Ibrahim Ulukaya Avatar answered Oct 13 '22 06:10

Ibrahim Ulukaya