I have created a new project and turned on YouTube Data API v3. In API access pane I have Key for browser apps (with referers) created, witch works fine. I went ahead and created Key for iOS apps (with bundle identifiers). Everything looks well I have checked the bundle id 10 times, I am sure it is correct. However if I go ahead and create NSURLRequest from my iOS app using iOS API key I get error response:
error = {
code = 403;
errors = (
{
domain = usageLimits;
message = "Access Not Configured";
reason = accessNotConfigured;
}
);
message = "Access Not Configured";
};
}
Using same url only passing my Key for browser apps (with referers) work without any issues.
NSString *string=[NSString stringWithFormat:@"https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=%@&fields=items(id,snippet(channelId,title,categoryId),statistics(viewCount))&part=snippet,statistics",key];
I am really puzzled on what is the problem here, I have been trying to get it to work with iOS app Key hours now. Is there something obvious Im missing ?
"code": 403, "message": "The user does not have sufficient permissions for file {fileId}." To fix this error, instruct the user to contact the file's owner and request edit access. You can also check user access levels in the metadata retrieved by files.
In Google API dashboard, click Library on the left menu. Click YouTube Data API v3, then click the Enable button to enable the API service.
My YouTube API Key is Not Working Your API key may not be working because you're using it for the wrong project. Be sure you're using the key for the project that you created it for, especially if you created multiple projects at the same time. If it's still not working, consider creating a new API key entirely.
Resolve a 403 error: User rate limit exceeded To fix this error, try to optimize your application code to make fewer requests or retry requests. For information on retrying requests, refer to Retry failed requests to resolve errors. For additional information on Gmail limits, refer to Usage limits.
If you're making raw HTTP requests from any application (iOS or otherwise), then you can include the "key for browser apps" as the key=
URL parameter and it should be sufficient (at least for read-only, non-authenticated calls).
If you restrict your API to iOS application you must include the bundle id with the parameter x-ios-identifier-bundle-identifier
on request's header
https://groups.google.com/forum/#!topic/google-cloud-endpoints/I-u3sAUU3Ts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With