通过CalDav协议获取日历列表时,我需要有关错误'accessNotConfigured'错误的帮助

时间:2020-04-23 11:21:38

标签: calendar caldav

使用caldav协议获取日历列表时出现问题

我通过caldav实现了两个API。我有时将方法称为rest api

[PROPFIND] http://www.google.com/caldav/dav
header{
   "authorization:" : "Barer ~~asdfasdfsadf...."
   "Content-Type" : "text/xml"
}

我这样回避了正确的回答。

<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:caldav="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:ical="http://apple.com/ns/ical/">
 <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">
  <D:href>/calendar/dav/</D:href>
  <D:propstat>
   <D:status>HTTP/1.1 200 OK</D:status>
   <D:prop>
    <D:current-user-principal>
     <D:href>/calendar/dav/mobistest1094%40gmail.com/user</D:href>
    </D:current-user-principal>
   </D:prop>
  </D:propstat>
 </D:response>
</D:multistatus>

但是有时候。当我调用10次此方法时 我收到2到3次错误结果..如下所示

<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
 <error>
  <domain>GData</domain>
  <code>accessNotConfigured</code>
  <internalReason>CalDAV API has not been used in project 272513869915 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/caldav.googleapis.com/overview?project=272513869915 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.</internalReason>
 </error>

0 个答案:

没有答案