---
title: "Retrieve the Matrix User ID of a corresponding third-party user."
method: GET
path: "/_matrix/client/v3/thirdparty/user/{protocol}"
tags: ["Third-party Lookup"]
---

# Retrieve the Matrix User ID of a corresponding third-party user.

`GET /_matrix/client/v3/thirdparty/user/{protocol}`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v3/thirdparty/user/{protocol}`
- Auth: one of:
  - API key in query parameter `access_token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v3/thirdparty/user/:protocol/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a Matrix User ID linked to a user on the third-party service, given
a set of user parameters.

## Path parameters

- `protocol` string, required

## Query parameters

- `fields` object

## Response `200`

The Matrix User IDs found with the given parameters.

- object[]: List of matched third-party users.
  - `fields` object, required: Information used to identify this third-party location.
  - `protocol` string, required: The protocol ID that the third-party location is a part of.
  - `userid` string, required: A Matrix User ID representing a third-party user.

## Other responses

- `404`: The Matrix User ID was not found.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
