Skip to main content
GET
/
address_book
/
registered_users.json
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 69049dfb31898c7b2f3fd7016bb48ecd40012bba" \
https://api.quickblox.com/address_book/registered_users.json
// compact=0
{
  "items": [
    {
      "user": {
        "id": 96830631,
        "full_name": "Mike Howard",
        "email": "mike@gmail.com",
        "login": "Mike",
        "phone": "463571393241",
        "website": "https://mysite.com",
        "created_at": "2019-08-29T18:58:22Z",
        "updated_at": "2020-01-27T14:27:12Z",
        "last_request_at": "2019-09-09T21:01:58Z",
        "external_user_id": 172,
        "facebook_id": "8866",
        "twitter_id": "9366",
        "blob_id": null,
        "custom_data": null,
        "age_over16": true,
        "allow_statistics_analysis": true,
        "allow_sales_activities": true,
        "parents_contacts": "",
        "user_tags": "IOS,web"
      }
    }
  ]
}

// compact=1
{
  "items": [
    {
      "user": {
        "id": 96830631,
        "phone": "463571393241"
      }
    },
    {
      "user": {
        "id": 96831328,
        "phone": "65021272571"
      }
    }
  ]
}

Recipes

1

1. Set a device identifier

Set a udid parameter to specify a user’s device. If specified, contacts will be returned for a specified device only.
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 69049dfb31898c7b2f3fd7016bb48ecd40012bba" \
https://api.quickblox.com/address_book/registered_users.json?udid=A337E8A4-80AD-8ABA-9F5D-579EFF6BACAB&compact=1
2

2. Specify if you want to get a compact list with contacts

Set a compact parameter as 1 to get a compact list of contacts.
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 69049dfb31898c7b2f3fd7016bb48ecd40012bba" \
https://api.quickblox.com/address_book/registered_users.json?udid=A337E8A4-80AD-8ABA-9F5D-579EFF6BACAB&compact=1
3

3. As a result, the API returns a list of users' IDs and phone numbers.

curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 69049dfb31898c7b2f3fd7016bb48ecd40012bba" \
https://api.quickblox.com/address_book/registered_users.json?udid=A337E8A4-80AD-8ABA-9F5D-579EFF6BACAB&compact=1
Users are matched with address book contacts by phone number, so user and address book contact must have the same phone number to be included in response.

Query Parameters

udid
string
User’s device identifier. If specified, all operations will be in this context. Max. length is 64 symbols. If the device identifier is not specified, it means that a user has one global address book across all their devices.
force
integer
Defines force rewrite mode. Set force=1 to apply, then all previous contacts for the device context will be replaced by new ones.

Headers

QB-Token
string
required
A user or application session token. See Authentication page to learn more about session tokens.

Responses

A successful response
An error response
errors
array of strings
curl -X GET \
-H "Content-Type: application/json" \
-H "QB-Token: 69049dfb31898c7b2f3fd7016bb48ecd40012bba" \
https://api.quickblox.com/address_book/registered_users.json
// compact=0
{
  "items": [
    {
      "user": {
        "id": 96830631,
        "full_name": "Mike Howard",
        "email": "mike@gmail.com",
        "login": "Mike",
        "phone": "463571393241",
        "website": "https://mysite.com",
        "created_at": "2019-08-29T18:58:22Z",
        "updated_at": "2020-01-27T14:27:12Z",
        "last_request_at": "2019-09-09T21:01:58Z",
        "external_user_id": 172,
        "facebook_id": "8866",
        "twitter_id": "9366",
        "blob_id": null,
        "custom_data": null,
        "age_over16": true,
        "allow_statistics_analysis": true,
        "allow_sales_activities": true,
        "parents_contacts": "",
        "user_tags": "IOS,web"
      }
    }
  ]
}

// compact=1
{
  "items": [
    {
      "user": {
        "id": 96830631,
        "phone": "463571393241"
      }
    },
    {
      "user": {
        "id": 96831328,
        "phone": "65021272571"
      }
    }
  ]
}
I