> ## 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.

# Get User by External User ID

> Retrieve a user by External User ID.

#### Recipes

<AccordionGroup>
  <Accordion title="Get user by external user id with API key">
    <Steps>
      <Step title="1. Use 'Authorization' header to pass API key">
        ```curl {2} theme={null}
        curl -X GET \
        -H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
        https://api.quickblox.com/users/external/1236672.json
        ```
      </Step>

      <Step title="2. As a result, the API returns a user with the specified external user id">
        ```curl theme={null}
        curl -X GET \
        -H 'Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI' \
        https://api.quickblox.com/users/external/1236672.json
        ```
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

#### Query Parameters

<ParamField query="external_user_id" type="integer" required>
  ID of the user in the external system <Tooltip tip="External User ID- a unique identifier of the user in the integrated external system; used for cross- referencing. For example, a user has an internal user ID within the QuickBlox system and external ID, provided by the integrated external (client) system. When an API call with reference to the user has to be submitted, the user can be referenced by either internal or external identifiers.">External User ID</Tooltip>.
</ParamField>

#### Headers

<ParamField header="QB-Token" type="string" required> A user session token. See [Authentication](/reference/authentication) page to learn more about the session token. </ParamField>
<ParamField header="Authorization" type="string" required default="ApiKey {your_api_key}"> API key from Dashboard. Expected format: `ApiKey {your_api_key}`. Must be used either QB-Token or Authorization.</ParamField>

#### Responses

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

    <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>
  </Accordion>

  <Accordion title="401">
    An error response

    <ResponseField name="errors" type="object">
      <Expandable title="properties">
        <ResponseField name="base" type="array of strings" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="403">
    An error response

    <ResponseField name="errors" type="object">
      <Expandable title="properties">
        <ResponseField name="base" type="array of strings" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="404">
    An error response

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

    <ResponseField name="message" type="string" />
  </Accordion>

  <Accordion title="422">
    An error response

    <ResponseField name="errors" type="object">
      <Expandable title="properties">
        <ResponseField name="id" type="array of strings" />
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET \
  -H "QB-Token: bdbb2bd5abb81b1d7fe7be03db9305b46e012bba" \
  https://api.quickblox.com/users/external/133712.json
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "user": {
      "id": 96831397,
      "full_name": "Jen Lesser",
      "email": "jen@gmail.com",
      "login": "Jen",
      "phone": "+1331234215",
      "website": "https://mysite.com",
      "created_at": "2019-08-29T19:15:17Z",
      "updated_at": "2019-08-29T19:15:17Z",
      "last_request_at": null,
      "external_user_id": 133712,
      "facebook_id": "1338866",
      "twitter_id": "1339366",
      "blob_id": null,
      "custom_data": null,
      "age_over16": true,
      "allow_statistics_analysis": true,
      "allow_sales_activities": true,
      "parents_contacts": "",
      "user_tags": "android"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "errors": {
      "base": [
        "Required session does not exist"
      ]
    }
  }
  ```

  ```json 403 theme={null}
  {
    "errors": {
      "base": [
        "Users retrieving forbidden in admin panel, application settings. Setup it here https://admin.quickblox.com/apps/{app_id}/service/users/settings"
      ]
    }
  }
  ```

  ```json 404 theme={null}
  {
    "code": null,
    "message": "Couldn't find user"
  }
  ```

  ```json 422 theme={null}
  {
    "errors": {
      "id": [
        "should be a positive integer"
      ]
    }
  }
  ```
</ResponseExample>
