> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quickblox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Registered Users

> Retrieve users who have already registered from your address book.

#### Recipes

<AccordionGroup>
  <Accordion title="Retrieve compact list of registered users">
    <Steps>
      <Step title="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 {4} theme={null}
        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
        ```
      </Step>

      <Step title="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 {4} theme={null}
        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
        ```
      </Step>

      <Step title="3. As a result, the API returns a list of users' IDs and phone numbers.">
        ```curl theme={null}
        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
        ```
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

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

<ParamField query="udid" type="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.
</ParamField>

<ParamField query="force" type="integer">
  Defines force rewrite mode. Set `force=1` to apply, then all previous contacts for the device context
  will be replaced by new ones.
</ParamField>

#### Headers

<ParamField header="QB-Token" type="string" required> A user or application session token. See [Authentication](/reference/authentication) page to learn more about session tokens. </ParamField>

#### Responses

<AccordionGroup>
  <Accordion title="200">
    A successful response

    <Expandable title="compact=0">
      <ResponseField name="items" type="array of objects">
        <Expandable title="properties">
          <ResponseField name="user" type="object">
            <Expandable title="properties">
              <ResponseField name="id" type="integer" />

              <ResponseField name="full_name" type="string" />

              <ResponseField name="email" type="string" />

              <ResponseField name="login" type="string" />

              <ResponseField name="phone" type="string" />

              <ResponseField name="website" type="string" />

              <ResponseField name="created_at" type="string" />

              <ResponseField name="updated_at" type="string" />

              <ResponseField name="last_request_at" type="string" />

              <ResponseField name="external_user_id" type="integer" />

              <ResponseField name="facebook_id" type="string" />

              <ResponseField name="twitter_id" type="string" />

              <ResponseField name="blob_id" type="string" />

              <ResponseField name="custom_data" type="string" />

              <ResponseField name="age_over16" type="boolean" />

              <ResponseField name="allow_statistics_analysis" type="boolean" />

              <ResponseField name="allow_sales_activities" type="boolean" />

              <ResponseField name="parents_contacts" type="string" />

              <ResponseField name="user_tags" type="string" />
            </Expandable>
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>

    <Expandable title="compact=1">
      <ResponseField name="items" type="array of objects">
        <Expandable title="properties">
          <ResponseField name="user" type="object">
            <Expandable title="properties">
              <ResponseField name="id" type="integer" />

              <ResponseField name="phone" type="string" />
            </Expandable>
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Expandable>
  </Accordion>

  <Accordion title="404">
    An error response

    <ResponseField name="errors" type="array of strings" />
  </Accordion>
</AccordionGroup>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET \
  -H "Content-Type: application/json" \
  -H "QB-Token: 69049dfb31898c7b2f3fd7016bb48ecd40012bba" \
  https://api.quickblox.com/address_book/registered_users.json
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  // 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"
        }
      }
    ]
  }
  ```

  ```json 404 theme={null}
  {
    "errors": [
      "Empty address book"
    ]
  }
  ```
</ResponseExample>
