Identity API \ Read the contacts of an identity PHP SDK
Resource/URI - Common | GET | POST | PUT | DELETE |
---|---|---|---|---|
Identities
/identities.json
|
List all identities | – | – | – |
Identity
/identities/<identity_token>.json
|
Read identity details | – | – | Delete identity |
Identity
/identities/<identity_token>/link.json
|
– | – | ReLink identity | – |
Identity
/identities/<identity_token>/synchronize.json
|
– | – | Synchronize identity | – |
Identity
/identities/<identity_token>/contacts.json
|
Read identity contacts | – | – | – |
Resource/URI - Provider Specific | GET | POST | PUT | DELETE |
---|---|---|---|---|
Steam Games
/identities/<identity_token>/steam/games.json
|
List all Steam games | – | – | – |
Facebook Posts
/identities/<identity_token>/facebook/posts.json
|
List all Facebook posts | – | – | – |
Workflow
Request: the code to send to the API
Send a GET
request to the resource /identities/<identity_token>/contacts.json
to retrieve the contacts of an identity.
The <identity_token>
has to be replaced by the unique token of an existing identity.
This endpoint works with Facebook, Twitter, LinkedIn, Google, Yahoo and Microsoft identities. To be able to retrieve a user's contacts, it might be necessary to enable the corresponding permissions in the settings of the social network in your OneAll account.
Result: the code returned by the API
The API will retrieve the user's contacts from his social network profile and return a normalized list. Requests that return multiple entries will be paginated to 250 items by default. The results of this endpoint are cached and updated once per day.
Example Resultset
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | { "response" : { "request" : { "date" : "Tue, 06 Jun 2017 14:41:58 0200" , "resource" : "/identities/923843ec-1749-4cc1-988f-d6963f3b1baa/contacts.json" , "status" : { "flag" : "success" , "code" : 200 , "info" : "Your request has been processed successfully" } }, "result" : { "data" : { "cache" : { "has_been_used" : true , "date_last_update" : "Tue, 06 Jun 2017 14:41:57 +0200" , "date_next_update" : "Wed, 07 Jun 2017 14:41:57 +0200" }, "contacts" : { "pagination" : { "current_page" : 1 , "total_pages" : 1 , "entries_per_page" : 200 , "total_entries" : 3 , "order" : { "field" : "id" , "direction" : "asc" } }, "count" : 3 , "entries" : [ { "name" : { "formatted" : "John Miller" }, "email" : "jmiller@example.com" , "profileUrl" : "https://www.facebook.com/profile.php?id=1111111111" , "thumbnailUrl" : "https://graph.facebook.com/1111111111/picture?type=small" , "provider_properties" : { "key" : "1111111111" , "flags" : "friend_of_this_user" } }, { "name" : { "formatted" : "Robert Doe" }, "email" : "rdoe@example.com" , "profileUrl" : "https://www.facebook.com/profile.php?id=2222222222" , "thumbnailUrl" : "https://graph.facebook.com/2222222222/picture?type=small" , "provider_properties" : { "key" : "2222222222" , "flags" : "friend_of_this_user" } }, { "name" : { "formatted" : "Susan Nicolson" }, "email" : "snicolson@example.com" , "profileUrl" : "https://www.facebook.com/profile.php?id=3333333333" , "thumbnailUrl" : "https://graph.facebook.com/3333333333/picture?type=small" , "provider_properties" : { "key" : "3333333333" , "flags" : "friend_of_this_user" } } ] } } } } } |