@@ -56,8 +56,9 @@ requirements for server responses.
5656
5757### Standard error response
5858
59- Any errors which occur at the Matrix API level MUST return a "standard
60- error response". This is a JSON object which looks like:
59+ Any errors which occur at the Matrix API level (for requests that are within
60+ scope of these [ API Standards] ( #api-standards ) ) MUST return a "standard error
61+ response". This is a JSON object which looks like:
6162
6263``` json
6364{
@@ -415,7 +416,9 @@ valid data was obtained, but no server is available to serve the client.
415416No further guess should be attempted and the user should make a
416417conscientious decision what to do next.
417418
418- ### Well-known URIs
419+ ### <a id =" well-known-uri " /> Well-known URIs
420+
421+ <!-- NB: `#well-known-uri` is linked to from https://www.iana.org/assignments/well-known-uris -->
419422
420423Matrix facilitates automatic discovery for the Client-Server API base URL and more via the
421424[ RFC 8615] ( https://datatracker.ietf.org/doc/html/rfc8615 ) "Well-Known URI" method.
@@ -1860,7 +1863,8 @@ A successful authorisation will have a `code` value, for example:
18601863https://app.example.com/oauth2-callback#state=ewubooN9weezeewah9fol4oothohroh3&code=iuB7Eiz9heengah1joh2ioy9ahChuP6R
18611864```
18621865
1863- A failed authorisation will have the following values:
1866+ A failed authorisation will have the following values as defined by
1867+ [ RFC 6749 section 4.1.2.1] ( https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1 ) :
18641868
18651869- ` error ` : the error code
18661870- ` error_description ` : the error description (optional)
@@ -1891,6 +1895,12 @@ parameters, encoded as `application/x-www-form-urlencoded` in the body:
18911895The server replies with a JSON object containing the access token, the token
18921896type, the expiration time, and the refresh token.
18931897
1898+ {{% boxes/note %}}
1899+ Error responses to this request do not follow the Matrix [ standard error
1900+ response] ( #standard-error-response ) structure and are instead defined by
1901+ [ RFC 6749 section 5.2] ( https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 ) .
1902+ {{% /boxes/note %}}
1903+
18941904Sample token request:
18951905
18961906``` nohighlight
@@ -1979,6 +1989,12 @@ containing:
19791989It is RECOMMENDED that the server provides a ` verification_uri_complete ` such
19801990that the user does not need to type in the ` user_code ` .
19811991
1992+ {{% boxes/note %}}
1993+ Error responses do not follow the Matrix [ standard error response] ( #standard-error-response )
1994+ structure and are instead defined by [ RFC 6749 section 5.2] ( https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 ) ,
1995+ as required by [ RFC 8628 section 3.2] ( https://datatracker.ietf.org/doc/html/rfc8628#section-3.2 ) .
1996+ {{% /boxes/note %}}
1997+
19821998Sample response:
19831999
19842000``` json
@@ -2077,6 +2093,12 @@ The server replies with a JSON object containing the new access token, the token
20772093type, the expiration time, and a new refresh token, like in the authorisation
20782094flow.
20792095
2096+ {{% boxes/note %}}
2097+ Error responses to this request do not follow the Matrix [ standard error
2098+ response] ( #standard-error-response ) structure and are instead defined by
2099+ [ RFC 6749 section 5.2] ( https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 ) .
2100+ {{% /boxes/note %}}
2101+
20802102#### Server metadata discovery
20812103
20822104{{% http-api spec="client-server" api="oauth_server_metadata" %}}
@@ -2239,6 +2261,12 @@ Upon successful registration, the server replies with an `HTTP 201 Created`
22392261response, with a JSON object containing the allocated ` client_id ` and all the
22402262registered metadata values.
22412263
2264+ {{% boxes/note %}}
2265+ Error responses to this request do not follow the Matrix [ standard error
2266+ response] ( #standard-error-response ) structure and are instead defined by
2267+ [ RFC 7591 section 3.2.2] ( https://datatracker.ietf.org/doc/html/rfc7591#section-3.2.2 ) .
2268+ {{% /boxes/note %}}
2269+
22422270With the registration request above, the server might reply with:
22432271
22442272``` json
@@ -2547,6 +2575,12 @@ The server SHOULD return one of the following responses:
25472575- For other errors, the server returns a ` 400 Bad Request ` response with error
25482576 details
25492577
2578+ {{% boxes/note %}}
2579+ Error responses to this request do not follow the Matrix [ standard error
2580+ response] ( #standard-error-response ) structure and are instead defined by
2581+ [ RFC 7009 section 2.2.1] ( https://datatracker.ietf.org/doc/html/rfc7009#section-2.2.1 ) .
2582+ {{% /boxes/note %}}
2583+
25502584#### User registration
25512585
25522586Clients can signal to the server that the user desires to register a new account
0 commit comments