diff options
author | Ashish Kumar <ashfame@users.noreply.github.com> | 2022-11-11 19:38:17 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 15:38:17 +0000 |
commit | a3623af74e0af0d2f6cbd37b47dc54a1acd314d5 (patch) | |
tree | 75eb73d5832e371e47dffcc571bc6e35ce523939 /docs/admin_api/user_admin_api.md | |
parent | Merge/remove `Slaved*` stores into `WorkerStores` (#14375) (diff) | |
download | synapse-a3623af74e0af0d2f6cbd37b47dc54a1acd314d5.tar.xz |
Add an Admin API endpoint for looking up users based on 3PID (#14405)
Diffstat (limited to 'docs/admin_api/user_admin_api.md')
-rw-r--r-- | docs/admin_api/user_admin_api.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index c95d6c9b05..880bef4194 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -1197,3 +1197,42 @@ Returns a `404` HTTP status code if no user was found, with a response body like ``` _Added in Synapse 1.68.0._ + + +### Find a user based on their Third Party ID (ThreePID or 3PID) + +The API is: + +``` +GET /_synapse/admin/v1/threepid/$medium/users/$address +``` + +When a user matched the given address for the given medium, an HTTP code `200` with a response body like the following is returned: + +```json +{ + "user_id": "@hello:example.org" +} +``` + +**Parameters** + +The following parameters should be set in the URL: + +- `medium` - Kind of third-party ID, either `email` or `msisdn`. +- `address` - Value of the third-party ID. + +The `address` may have characters that are not URL-safe, so it is advised to URL-encode those parameters. + +**Errors** + +Returns a `404` HTTP status code if no user was found, with a response body like this: + +```json +{ + "errcode":"M_NOT_FOUND", + "error":"User not found" +} +``` + +_Added in Synapse 1.72.0._ |