get icloud web service endpoints to fetch data
Asked Answered
G

1

6

My question may look silly but I am asking this after too much search on Google, yet not have any clue.

I am using iCloud web services. For that I have converted this Python code to PHP. https://github.com/picklepete/pyicloud

Up to this, everything is working good. When authenticate using icloud username,password I am getting a list of web service URLs as part of response. Now for example to use Contacts web service, I need to use Contact web service URL and add a part to that URL to fetch contacts.

https://p45-contactsws.icloud.com:443/co/startup with some parameters.

The webservice URL https://p45-contactsws.icloud.com:443 is coming in response while authenticating. But the later part, 'co/startup' is there in the python code. I don't know how they found that part. So for some services which is there in Python code, they are working good. But I want to use few other service like https://p45-settingsws.icloud.com:443, https://p45-keyvalueservice.icloud.com:443 etc. and when I try to send request with correct parameters to this other services, I am getting errors like 404 not found or unauthorized access. So I believe that some URL part must be added to this just like contacts. If someone knows how or where can I get correct URL part, I will be really thankful.

Thanks to all in advance for their time reading/answering my question.

Guttering answered 5/5, 2016 at 6:33 Comment(0)
P
1

I am afraid there doesn't seem to be an official source for these API endpoints, since they seem to be discovered through sniffing the network calls rather than a proper guide from Apple. For example, this presentation, which comes from a forensic tools company, is from 2013 and covers some of the relevant endpoints. Note that iOS was still at versions 5 & 6 then (vs. the current v9.3).

All other code samples on the net basically are using the same set of API endpoints that were originally observed in 2012-2013. (Here's a snippet from another python module with additional URLs you may use.) However, all of them pretty much point to each other as the source.

If you'd like to pursue a different path, Apple now promotes the CloudKit and CloudKit JS solutions for registered apps working with iCloud data.

Platinum answered 10/5, 2016 at 0:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.