I want my web application allow to import user contacts (particularly addresses) from iCloud contacts.
Something similar to what Google People API provides for Google Contacts.
The scenario is that, a user comes to my site using a desktop browser and imports all their contacts.
So the user should not waste time on typing all their contacts to be able to use them on the site.
I'm trying to use CloudKit JS for the issue.
It looks like .discoverAllUserIdentities is what I need according to this:
GET users/discover: Fetches all user identities in the current user’s address book, described in Discovering All User Identities (GET users/discover)
However, I'm getting the empty set:
{"users":[]}
It seems like the web application doesn't have the permissions to get the contacts. If it's so, how to request the permissions?
Or may be I'm on completely wrong way, then please point me on the right direction if the issue is solvable.