0
我正在使用objective-c google數據api庫嘗試訪問YouTube數據。我已經建立了一個應用程序,啓用了YouTube數據API,並創建了一個特定於iOS的密鑰。但是,每次嘗試訪問api時,都會收到403「訪問未配置」錯誤。我也有五元檢查我的捆綁標識符。這裏是我的代碼:Google數據API - 訪問未配置錯誤
service = [[GTLServiceYouTube alloc] init];
service.shouldFetchNextPages = YES;
service.retryEnabled = YES;
service.apiVersion = @"v3";
service.APIKey = @"API KEY GOES HERE"; // proper api key is filled in here
[service executeQuery:query
completionHandler:^(GTLServiceTicket *ticket,
id object,
NSError *error) {
if (error == nil) {
GTLYouTubeSearchListResponse *videos = object;
for (GTLYouTubeVideo *video in videos) {
NSLog(@"%@", video);
}
}
else {
NSLog(@"%@", error.description);
}
}];
此問題在內部報告。您可以通過公開問題跟蹤器進行跟蹤。 https://code.google.com/p/gdata-issues/issues/detail?id=5770 –
謝謝!根據您在問題跟蹤器中的消息,我們可以通過在google api控制檯中刪除捆綁標識符記錄來解決此問題。謹慎使用,因爲這可能會導致您未經授權使用您的密鑰。 – jscheel