mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-02-21 21:43:43 +01:00
Merge 8cb0b3e7f6 into d8be2ad942
This commit is contained in:
commit
ddabb8e083
|
|
@ -0,0 +1 @@
|
||||||
|
Add note to each endpoint that uses capability negotiation and document expected response when the capability is not available.
|
||||||
|
|
@ -99,6 +99,10 @@ paths:
|
||||||
has been removed, making this endpoint behave as though it was `false`.
|
has been removed, making this endpoint behave as though it was `false`.
|
||||||
This results in this endpoint being an equivalent to `/3pid/bind` rather
|
This results in this endpoint being an equivalent to `/3pid/bind` rather
|
||||||
than dual-purpose.
|
than dual-purpose.
|
||||||
|
|
||||||
|
This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation).
|
||||||
|
Clients SHOULD check the value of the [`m.3pid_changes` capability](/client-server-api/#m3pid_changes-capability)
|
||||||
|
to determine if this endpoint is available.
|
||||||
operationId: post3PIDs
|
operationId: post3PIDs
|
||||||
deprecated: true
|
deprecated: true
|
||||||
security:
|
security:
|
||||||
|
|
@ -176,6 +180,18 @@ paths:
|
||||||
value: {
|
value: {
|
||||||
"submit_url": "https://example.org/path/to/submitToken"
|
"submit_url": "https://example.org/path/to/submitToken"
|
||||||
}
|
}
|
||||||
|
"400":
|
||||||
|
description: The 3PID changes capability is not available.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_FORBIDDEN",
|
||||||
|
"error": "3PID changes are disabled on this server."
|
||||||
|
}
|
||||||
"403":
|
"403":
|
||||||
description: The credentials could not be verified with the identity server.
|
description: The credentials could not be verified with the identity server.
|
||||||
content:
|
content:
|
||||||
|
|
@ -202,6 +218,10 @@ paths:
|
||||||
Homeservers should prevent the caller from adding a 3PID to their account if it has
|
Homeservers should prevent the caller from adding a 3PID to their account if it has
|
||||||
already been added to another user's account on the homeserver.
|
already been added to another user's account on the homeserver.
|
||||||
|
|
||||||
|
This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation).
|
||||||
|
Clients SHOULD check the value of the [`m.3pid_changes` capability](/client-server-api/#m3pid_changes-capability)
|
||||||
|
to determine if this endpoint is available.
|
||||||
|
|
||||||
{{% boxes/warning %}}
|
{{% boxes/warning %}}
|
||||||
Since this endpoint uses User-Interactive Authentication, it cannot be used when the access token was obtained
|
Since this endpoint uses User-Interactive Authentication, it cannot be used when the access token was obtained
|
||||||
via the [OAuth 2.0 API](/client-server-api/#oauth-20-api).
|
via the [OAuth 2.0 API](/client-server-api/#oauth-20-api).
|
||||||
|
|
@ -244,6 +264,18 @@ paths:
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {}
|
value: {}
|
||||||
|
"400":
|
||||||
|
description: The 3PID changes capability is not available.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_FORBIDDEN",
|
||||||
|
"error": "3PID changes are disabled on this server."
|
||||||
|
}
|
||||||
"401":
|
"401":
|
||||||
description: The homeserver requires additional authentication information.
|
description: The homeserver requires additional authentication information.
|
||||||
content:
|
content:
|
||||||
|
|
@ -331,6 +363,10 @@ paths:
|
||||||
Unlike other endpoints, this endpoint does not take an `id_access_token`
|
Unlike other endpoints, this endpoint does not take an `id_access_token`
|
||||||
parameter because the homeserver is expected to sign the request to the
|
parameter because the homeserver is expected to sign the request to the
|
||||||
identity server instead.
|
identity server instead.
|
||||||
|
|
||||||
|
This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation).
|
||||||
|
Clients SHOULD check the value of the [`m.3pid_changes` capability](/client-server-api/#m3pid_changes-capability)
|
||||||
|
to determine if this endpoint is available.
|
||||||
operationId: delete3pidFromAccount
|
operationId: delete3pidFromAccount
|
||||||
security:
|
security:
|
||||||
- accessTokenQuery: []
|
- accessTokenQuery: []
|
||||||
|
|
@ -389,6 +425,18 @@ paths:
|
||||||
example: success
|
example: success
|
||||||
required:
|
required:
|
||||||
- id_server_unbind_result
|
- id_server_unbind_result
|
||||||
|
"400":
|
||||||
|
description: The 3PID changes capability is not available.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_FORBIDDEN",
|
||||||
|
"error": "3PID changes are disabled on this server."
|
||||||
|
}
|
||||||
tags:
|
tags:
|
||||||
- Account management
|
- Account management
|
||||||
/account/3pid/unbind:
|
/account/3pid/unbind:
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,18 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: definitions/auth_response.yaml
|
$ref: definitions/auth_response.yaml
|
||||||
|
"404":
|
||||||
|
description: The get login token capability is not available.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_UNRECOGNIZED",
|
||||||
|
"error": "The get login token capability is not available."
|
||||||
|
}
|
||||||
"429":
|
"429":
|
||||||
description: This request was rate-limited.
|
description: This request was rate-limited.
|
||||||
content:
|
content:
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,10 @@ paths:
|
||||||
valid access token is provided. The homeserver SHOULD NOT revoke the
|
valid access token is provided. The homeserver SHOULD NOT revoke the
|
||||||
access token provided in the request. Whether other access tokens for
|
access token provided in the request. Whether other access tokens for
|
||||||
the user are revoked depends on the request parameters.
|
the user are revoked depends on the request parameters.
|
||||||
|
|
||||||
|
This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation).
|
||||||
|
Clients SHOULD check the value of the [`m.change_password` capability](/client-server-api/#mchange_password-capability)
|
||||||
|
to determine if this endpoint is available.
|
||||||
security:
|
security:
|
||||||
- {}
|
- {}
|
||||||
- accessTokenQuery: []
|
- accessTokenQuery: []
|
||||||
|
|
@ -82,6 +86,18 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: definitions/auth_response.yaml
|
$ref: definitions/auth_response.yaml
|
||||||
|
"403":
|
||||||
|
description: The password change capability is not available.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_FORBIDDEN",
|
||||||
|
"error": "Password change is disabled."
|
||||||
|
}
|
||||||
"429":
|
"429":
|
||||||
description: This request was rate-limited.
|
description: This request was rate-limited.
|
||||||
content:
|
content:
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,11 @@ paths:
|
||||||
Servers MAY reject `null` values. Servers that accept `null` values SHOULD store
|
Servers MAY reject `null` values. Servers that accept `null` values SHOULD store
|
||||||
them rather than treating `null` as a deletion request. Clients that want to delete a
|
them rather than treating `null` as a deletion request. Clients that want to delete a
|
||||||
field, including its key and value, SHOULD use the `DELETE` endpoint instead.
|
field, including its key and value, SHOULD use the `DELETE` endpoint instead.
|
||||||
|
|
||||||
|
This endpoint uses [capabilities negotiation](/client-server-api/#capabilities-negotiation)
|
||||||
|
depending on the `keyName`. Clients SHOULD check the value of the
|
||||||
|
[`m.profile_fields` capability](/client-server-api/#mprofile_fields-capability) to detect
|
||||||
|
which `keyName`s they are allowed to modify.
|
||||||
operationId: setProfileField
|
operationId: setProfileField
|
||||||
security:
|
security:
|
||||||
- accessTokenQuery: []
|
- accessTokenQuery: []
|
||||||
|
|
@ -116,6 +121,12 @@ paths:
|
||||||
"errcode": "M_INVALID_PARAM",
|
"errcode": "M_INVALID_PARAM",
|
||||||
"error": "Invalid profile key.",
|
"error": "Invalid profile key.",
|
||||||
}
|
}
|
||||||
|
capability_disabled:
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"errcode": "M_FORBIDDEN",
|
||||||
|
"error": "Profile modification is disabled on this homeserver.",
|
||||||
|
}
|
||||||
"403":
|
"403":
|
||||||
description: The server is unwilling to perform the operation, either
|
description: The server is unwilling to perform the operation, either
|
||||||
due to insufficient permissions or because profile modifications
|
due to insufficient permissions or because profile modifications
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue