该操作无法完成。 (com.google.HTTPStatus错误403.)

时间:2017-02-07 09:05:28

标签: ios objective-c google-api google-drive-api

我正在尝试从iOS中的谷歌驱动器文件下载并在以下

中收到错误
GTLServiceDrive* googleDriveService = [[GTLServiceDrive alloc] init];

NSString *urlTest = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@?alt=media",itemIdentifier[indexPath.row]];
GTMSessionFetcher *fetcherTest = [googleDriveService.fetcherService fetcherWithURLString:urlTest];
[fetcherTest beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
    if (error == nil) {
        NSLog(@"Retrieved file content");
        NSLog(@"File size is : %.2f MB",(float)data.length/1024.0f/1024.0f);
        // Do something with data
    } else {
        NSLog(@"error: %@", [error localizedDescription]);
    }
}];
  

错误:无法完成操作。 (com.google.HTTPStatus   错误403。)

0 个答案:

没有答案