【问题标题】:How to get contacts from iCloud using iCloud API?如何使用 iCloud API 从 iCloud 获取联系人?
【发布时间】:2017-07-17 15:43:21
【问题描述】:

我想使用 iCloud ID 和密码获取 iCloud 帐户的联系人。为此,我成功验证了 iCloud 帐户以获取 Web 令牌。

现在我尝试获取联系人。我正在关注这个link,我的联系网址是:

https://p49-contactsws.icloud.com:443/co/startup?clientBuildNumber=XXX&clientId=XXXXXXXX&clientVersion=2.1&dsid=XXXXXXXX&locale=en-gb_US&order=last%2Cfirst

我也试过没有 :443

我也将请求标头用作:

Origin: https://www.icloud.com
Cookie: X-APPLE-WEBAUTH-TOKEN=v=2:t=XXXXXXXXX; X-APPLE-WEBAUTH-USER=v=1:s=1:d=XXXXXXXXX

但我收到 404 Bad Request Error with response:

{
    "requestUUID": "1bc9e987-1f0b-4658-9912-dcf5cc9a2810",
    "errorReason": "Bad Request",
    "errorCode": 400
}

【问题讨论】:

    标签: icloud-api


    【解决方案1】:

    我已经更改了我的 URL 的语言环境参数并且它对我来说工作正常。

    工作网址是:

    https://p49-contactsws.icloud.com/co/startup?clientBuildNumber=XXX&clientId=XXXXXXXX&clientVersion=2.1&dsid=XXXXXXXX&locale=en_GBS&order=last%2Cfirst

    【讨论】:

    • 您好,我收到“远程服务器返回错误:(421) Misdirected Request. in response”。另外,我找不到“X-APPLE-WEBAUTH-TOKEN”cookie。你能把你的代码贴出来吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-20
    • 2017-01-01
    • 2015-10-06
    • 1970-01-01
    • 1970-01-01
    • 2013-06-10
    • 2012-02-24
    相关资源
    最近更新 更多