小编var*_*ddy的帖子

500 error.Internal [backend error] Google Api Push #gmail_watch

我尝试使用此处的指南获取通知. https://developers.google.com/gmail/api/guides/push#gmail_watch

Gmail服务(服务)可以获取标签,收件箱和其他API功能.

这是代码.

        var service = new GmailService(new BaseClientService.Initializer()
    {
        HttpClientInitializer = credential,
        ApplicationName = ApplicationName,
    });
    IList<string> label = new List<string>();
    label.Add("INBOX");
    WatchRequest request2 = new WatchRequest
    {
        LabelIds = label,
        LabelFilterAction = "include",
        TopicName = "projects/******/topics/****TestTopic"
    };
    var x= service.Users.Watch(request2, "me").Execute();
Run Code Online (Sandbox Code Playgroud)

Watch抛出这个例外

Google.Apis.Requests.RequestError
Backend Error [500]
Errors [
    Message[Backend Error] Location[ - ] Reason[backendError] Domain[global]
]
Run Code Online (Sandbox Code Playgroud)

.net gmail-api

3
推荐指数
1
解决办法
594
查看次数

标签 统计

.net ×1

gmail-api ×1