3
votes

I am trying to fetch video details using YouTube Data API v3 in my android app. Now I am getting the following error even though I am using an API Key. How can I resolve it?

06-19 17:50:58.280: E/There was a service error:(16968): com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
    06-19 17:50:58.280: E/There was a service error:(16968): {
    06-19 17:50:58.280: E/There was a service error:(16968):   "code" : 403,
    06-19 17:50:58.280: E/There was a service error:(16968):   "errors" : [ {
    06-19 17:50:58.280: E/There was a service error:(16968):     "domain" : "usageLimits",
    06-19 17:50:58.280: E/There was a service error:(16968):     "message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
    06-19 17:50:58.280: E/There was a service error:(16968):     "reason" : "dailyLimitExceededUnreg",
    06-19 17:50:58.280: E/There was a service error:(16968):     "extendedHelp" : "https://code.google.com/apis/console"
    06-19 17:50:58.280: E/There was a service error:(16968):   } ],
    06-19 17:50:58.280: E/There was a service error:(16968):   "message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
    06-19 17:50:58.280: E/There was a service error:(16968): }
2
@will: what you will get with these type of editings? points?Moses
The points for an edit are really small (if it goes through); I just like to try to help improve things to make the site better.Will

2 Answers

11
votes

Try to set api key on your query. It may resolve your problem. ex:

YouTube.Videos.List listVideosRequest = youtube.videos().list("snippet").setId(videoId);
          listVideosRequest.setKey(apiKey);
          VideoListResponse listResponse = listVideosRequest.execute();
0
votes

This issue seems to be due to not verified OAuth consent sreen by Google. They sometimes take a very long time to verify them and if your app is very popular, it reaches the Daily Limit for Unauthenticated Use rather quickly. So, there isn't much you can do other than contacting Google Trust & Safety team to expedite verification.