ios - 谷歌日历日历列表、事件列表
问题描述
我在我的一个 iOS 应用程序中使用 GTMAppAuth SignIn 进行身份验证。有了这个,我定义了所有可能的谷歌日历使用范围,但仍然出现以下错误。谷歌控制台上启用了谷歌日历 API 和 CalDAV API,但我仍然不知道为什么会出现这个错误。我还为谷歌 API 添加了范围如下图所示。
my code is given below:
-(void) fetchCalendarList
{
self.calendarList = nil;
self.calendarListFetchError = nil;
id<GTMFetcherAuthorizationProtocol> authorization =
[GTMAppAuthFetcherAuthorization authorizationFromKeychainForName:kGTMAppAuthKeychainItemName];
self.calendarService.authorizer = authorization;
GTLRCalendarService *service = self.calendarService;
GTLRCalendarQuery_CalendarListList *query = [GTLRCalendarQuery_CalendarListList query];
// query.minAccessRole = kGTLRCalendarMinAccessRoleOwner;
// query.minAccessRole = kGTLRCalendarOrderByStartTime;
self.calendarListTicket = [service executeQuery:query
completionHandler:^(GTLRServiceTicket *callbackTicket,
id calendarList,
NSError *callbackError) {
// Callback
self.calendarList = calendarList;
self.calendarListFetchError = callbackError;
self.calendarListTicket = nil;
[self fetchEvents];
}];
}
i am getting this error:
Printing description of callbackError:
Error Domain=com.google.GTLRErrorObjectDomain Code=403 "Insufficient Permission" UserInfo={GTLRStructuredError=GTLRErrorObject 0x1c065adc0: {message:"Insufficient Permission" errors:[1] code:403}, NSLocalizedDescription=Insufficient Permission}
解决方案
推荐阅读
- java - jar 文件执行适用于 -Dhttps.proxyHost 选项,但当我通过导出设置相同的代理然后运行 java -jar sample.jar 时不起作用
- amazon-sagemaker - 使用 AWS CLI 从 SageMaker Studio 推送 AWS ECR 中的 docker 映像
- palantir-foundry - 如何使用休息调用将一个数据帧的模式应用于另一个空数据帧
- reactjs - React Ant 设计标签单击并显示到文本区域
- python-3.x - 使用python __init__.py 导入多个sripts的常用模块
- artifactory - 未能将工件部署到工件版本 6.9.6 给出错误未经授权的 401
- git - 无法在 GitHub 上将我的第二封邮件的提交设为“已验证”
- c# - Xamarin 表单中的二进制分析 (Android)
- laravel - 使用爆炸但在第一个
模式之后 - ssl-certificate - Moodle:当我激活 Web 服务时,SSL 证书显示已过期