Ios 操作无法’;不可能完成。(com.google.HTTPStatus错误403。)

Ios 操作无法’;不可能完成。(com.google.HTTPStatus错误403。),ios,objective-c,google-api,google-drive-api,Ios,Objective C,Google Api,Google Drive Api,我正在尝试从iOS中的google drive文件下载,并在以下内容中出错 GTLServiceDrive* googleDriveService = [[GTLServiceDrive alloc] init]; NSString *urlTest = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@?alt=media",itemIdentifier[indexPath.row]]; GTMS

我正在尝试从iOS中的google drive文件下载,并在以下内容中出错

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。)


我不认为这是谷歌驱动api的正确端点,请看一看。我已经关注了你的链接,但现在仍然存在错误@DaImTo通常表示授权问题。您应该按照GData库的介绍文档中提到的那样打开,并检查实际的服务器请求和响应。