日历clientviauserconsent它在创建事件时给我授权错误
ClientViaUserConsent在浏览器中打开URL,但表示无效的请求。该URL是由LIB内部生成的。我仔细检查了两个平台的客户端,但仍然面临着为创建日历事件而获得身份验证者的问题。
我使用以下软件包在Google Calender中创建事件。
googleapis: ^8.1.0
googleapis_auth: ^1.3.0
static final androidClientId = ClientId('xxxxxxxx.apps.googleusercontent.com');
static final iOSClientId = ClientId('xxxxxxx.apps.googleusercontent.com');
final _clientID = Platform.isAndroid ? EventProvider.androidClientId : EventProvider.iOSClientId;
final _scopes = [CalendarApi.calendarScope];
clientViaUserConsent(_clientID, _scopes, prompt).then((AuthClient client) {
var calendar = CalendarApi(client);
}
void prompt(String url) async {
print(" => $url");
if (await canLaunch(url)) {
await launch(URL);
} else {
throw 'Could not launch $url';
}
}
我指的是在Google日历中创建事件的本文。
- https://medium.com/flutter-community/flutter-use-google-calendar-api-adding-the-the-the-the-calent-to-calendar-3d8fcb008493
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您看到该错误,因为该应用程序尚未验证。如果您是应用程序开发人员,我建议您检查应用程序验证FAQ 关于验证步骤。如果您不是开发人员,则可以尝试启用 secure Secure App App Access 但是请注意后果:
You are seeing that error because the app hasn't been verified. If you are the app developer I advise you to check the App Verification FAQ to learn more about the verification steps. If you aren't the developer, you could try to enable the less secure app access but please be mindful of the consequences: