icloud caldav返回401未经授权

时间:2017-06-30 14:30:52

标签: icloud caldav

使用caldav访问icloud日历,它运行正常。今天,邮差收集中的所有请求都开始从caldav.icloud.com获得401 我正在访问我自己的个人帐户进行测试,双倍检查我的密码一百次,仍然无法正常工作。

请求:

PROPFIND / HTTP/1.1
Host: caldav.icloud.com
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/xml
Cache-Control: no-cache
Postman-Token: 39b27b44-0a6f-b351-540f-f9446df618d0

<propfind xmlns='DAV:'>
    <prop>
        <current-user-principal/>
    </prop>
</propfind>

回应是:

401 unauthorized 

部首:

Connection →keep-alive
Content-Length →141
Content-Type →text/html;charset=utf-8
Date →Fri, 30 Jun 2017 14:23:34 GMT
Server →AppleHttpServer/2f080fc0
Strict-Transport-Security →max-age=31536000; includeSubDomains
WWW-Authenticate →x-mobileme-authtoken realm="MMCalDav", basic realm="MMCalDav"
X-Apple-Request-UUID →95e3a459-10b1-4d0a-a3ae-73f29b569481
X-Responding-Server →caldav:44101701:pv38p41ic-ztdg01080801:8001:17D70:375f9f89bf
X-Transaction-Id →95e3a459-10b1-4d0a-a3ae-73f29b569481
access-control-expose-headers →X-Apple-Request-UUID, Via
via →icloudedge:br30p01ic-zteu01122201:7401:17D30:Berlin

体:

<html>
    <head>
        <title>Unauthorized</title>
    </head>
    <body>
        <h1>Unauthorized</h1>
        <p>You are not authorized to access this resource.</p>
    </body>
</html>

有什么想法吗?

1 个答案:

答案 0 :(得分:4)

您不能再使用常规登录/密码进行第三方登录iCloud(DAV,IMAP等)。自2017年6月15日起,您需要一个&#34;应用专用密码&#34;。

此页面介绍如何生成一个:Using app-specific passwords。从该页面:

  • 登录您的Apple ID帐户页面。
  • 在“安全性”部分中,单击“在特定于应用程序的密码下方生成密码”。
  • 按照屏幕上的步骤操作。
相关问题