diff --git a/changelogs/client_server/newsfragments/3530.clarification b/changelogs/client_server/newsfragments/3530.clarification new file mode 100644 index 00000000..450740ea --- /dev/null +++ b/changelogs/client_server/newsfragments/3530.clarification @@ -0,0 +1 @@ +Add `403 M_FORBIDDEN` error code to `/profile/{userId}` as per [MSC3550](https://github.com/matrix-org/matrix-doc/pull/3550). diff --git a/data/api/client-server/profile.yaml b/data/api/client-server/profile.yaml index e0a4c50d..e8bdc4de 100644 --- a/data/api/client-server/profile.yaml +++ b/data/api/client-server/profile.yaml @@ -211,7 +211,24 @@ paths: displayname: type: string description: The user's display name if they have set one, otherwise not present. + 403: + x-addedInMatrixVersion: "1.2" + description: The server is unwilling to disclose whether the user exists and/or has profile information. + examples: + application/json: { + "errcode": "M_FORBIDDEN", + "error": "Profile lookup over federation is disabled on this homeserver" + } + schema: + "$ref": "definitions/errors/error.yaml" 404: description: There is no profile information for this user or this user does not exist. + examples: + application/json: { + "errcode": "M_NOT_FOUND", + "error": "Profile not found" + } + schema: + "$ref": "definitions/errors/error.yaml" tags: - User data