|
|
@ -202,57 +202,57 @@ paths:
|
|
|
|
- User data
|
|
|
|
- User data
|
|
|
|
"/register/email/requestToken":
|
|
|
|
"/register/email/requestToken":
|
|
|
|
post:
|
|
|
|
post:
|
|
|
|
summary: Requests a validation token be sent to the given email address for the purpose of registering an account
|
|
|
|
summary: Begins the validation process for an email to be used during registration.
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
Proxies the identity server API ``validate/email/requestToken``, but
|
|
|
|
Proxies the identity service API ``validate/email/requestToken``, but
|
|
|
|
first checks that the given email address is not already associated
|
|
|
|
first checks that the given email address is not already associated
|
|
|
|
with an account on this Home Server. See the Identity Server API for
|
|
|
|
with an account on this homeserver. See the Identity Service API for
|
|
|
|
further information.
|
|
|
|
further information.
|
|
|
|
operationId: requestTokenToRegisterEmail
|
|
|
|
operationId: requestTokenToRegisterEmail
|
|
|
|
parameters:
|
|
|
|
parameters:
|
|
|
|
- in: body
|
|
|
|
- in: body
|
|
|
|
name: body
|
|
|
|
name: body
|
|
|
|
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
allOf:
|
|
|
|
|
|
|
|
- $ref: "../identity/definitions/request_email_validation.yaml"
|
|
|
|
|
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
properties:
|
|
|
|
id_server:
|
|
|
|
id_server:
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
description: The ID server to send the onward request to as a hostname with an appended colon and port number if the port is not the default.
|
|
|
|
description: |-
|
|
|
|
example: "id.matrix.org"
|
|
|
|
The hostname of the identity service to communicate with. May
|
|
|
|
client_secret:
|
|
|
|
optionally include a port.
|
|
|
|
type: string
|
|
|
|
example: "id.example.com"
|
|
|
|
description: Client-generated secret string used to protect this session
|
|
|
|
required: ['id_server']
|
|
|
|
example: "this_is_my_secret_string"
|
|
|
|
|
|
|
|
email:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The email address
|
|
|
|
|
|
|
|
example: "example@example.com"
|
|
|
|
|
|
|
|
send_attempt:
|
|
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
|
|
description: Used to distinguish protocol level retries from requests to re-send the email.
|
|
|
|
|
|
|
|
example: 1
|
|
|
|
|
|
|
|
required: ["client_secret", "email", "send_attempt"]
|
|
|
|
|
|
|
|
responses:
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
200:
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
An email has been sent to the specified address.
|
|
|
|
An email has been sent to the specified address.
|
|
|
|
Note that this may be an email containing the validation token or it may be informing
|
|
|
|
Note that this may be an email containing the validation token or it may be informing
|
|
|
|
the user of an error.
|
|
|
|
the user of an error.
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {}
|
|
|
|
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
$ref: "../identity/definitions/sid.yaml"
|
|
|
|
|
|
|
|
403:
|
|
|
|
|
|
|
|
description: The homeserver does not permit the address to be bound.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "definitions/errors/error.yaml"
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {
|
|
|
|
|
|
|
|
"errcode": "M_THREEPID_DENIED",
|
|
|
|
|
|
|
|
"error": "Third party identifier is not allowed"
|
|
|
|
|
|
|
|
}
|
|
|
|
400:
|
|
|
|
400:
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
Part of the request was invalid. This may include one of the following error codes:
|
|
|
|
Part of the request was invalid. This may include one of the following error codes:
|
|
|
|
|
|
|
|
|
|
|
|
* ``M_THREEPID_IN_USE`` : The email address is already registered to an account on this server.
|
|
|
|
* ``M_THREEPID_IN_USE`` : The email address is already registered to an account on this server.
|
|
|
|
However, if the home server has the ability to send email, it is recommended that the server
|
|
|
|
However, if the homeserver has the ability to send email, it is recommended that the server
|
|
|
|
instead send an email to the user with instructions on how to reset their password.
|
|
|
|
instead send an email to the user with instructions on how to reset their password.
|
|
|
|
This prevents malicious parties from being able to determine if a given email address
|
|
|
|
This prevents malicious parties from being able to determine if a given email address
|
|
|
|
has an account on the Home Server in question.
|
|
|
|
has an account on the homeserver in question.
|
|
|
|
* ``M_SERVER_NOT_TRUSTED`` : The ``id_server`` parameter refers to an ID server
|
|
|
|
* ``M_SERVER_NOT_TRUSTED`` : The ``id_server`` parameter refers to an ID server
|
|
|
|
that is not trusted by this Home Server.
|
|
|
|
that is not trusted by this homeserver.
|
|
|
|
examples:
|
|
|
|
examples:
|
|
|
|
application/json: {
|
|
|
|
application/json: {
|
|
|
|
"errcode": "M_THREEPID_IN_USE",
|
|
|
|
"errcode": "M_THREEPID_IN_USE",
|
|
|
@ -264,49 +264,44 @@ paths:
|
|
|
|
post:
|
|
|
|
post:
|
|
|
|
summary: Requests a validation token be sent to the given phone number for the purpose of registering an account
|
|
|
|
summary: Requests a validation token be sent to the given phone number for the purpose of registering an account
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
Proxies the identity server API ``validate/msisdn/requestToken``, but
|
|
|
|
Proxies the identity service API ``validate/msisdn/requestToken``, but
|
|
|
|
first checks that the given phone number is not already associated
|
|
|
|
first checks that the given phone number is not already associated
|
|
|
|
with an account on this Home Server. See the Identity Server API for
|
|
|
|
with an account on this homeserver. See the Identity Service API for
|
|
|
|
further information.
|
|
|
|
further information.
|
|
|
|
operationId: requestTokenToRegisterMSISDN
|
|
|
|
operationId: requestTokenToRegisterMSISDN
|
|
|
|
parameters:
|
|
|
|
parameters:
|
|
|
|
- in: body
|
|
|
|
- in: body
|
|
|
|
name: body
|
|
|
|
name: body
|
|
|
|
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
allOf:
|
|
|
|
|
|
|
|
- $ref: "../identity/definitions/request_msisdn_validation.yaml"
|
|
|
|
|
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
properties:
|
|
|
|
id_server:
|
|
|
|
id_server:
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The ID server to send the onward request to as a hostname with an appended colon and port number if the port is not the default.
|
|
|
|
|
|
|
|
example: "id.matrix.org"
|
|
|
|
|
|
|
|
client_secret:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: Client-generated secret string used to protect this session.
|
|
|
|
|
|
|
|
example: "this_is_my_secret_string"
|
|
|
|
|
|
|
|
country:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
type: string
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
The two-letter uppercase ISO country code that the number in
|
|
|
|
The hostname of the identity service to communicate with. May
|
|
|
|
``phone_number`` should be parsed as if it were dialled from.
|
|
|
|
optionally include a port.
|
|
|
|
phone_number:
|
|
|
|
example: "id.example.com"
|
|
|
|
type: string
|
|
|
|
required: ['id_server']
|
|
|
|
description: The phone number.
|
|
|
|
|
|
|
|
example: "example@example.com"
|
|
|
|
|
|
|
|
send_attempt:
|
|
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
|
|
description: Used to distinguish protocol level retries from requests to re-send the SMS message.
|
|
|
|
|
|
|
|
example: 1
|
|
|
|
|
|
|
|
required: ["client_secret", "country", "phone_number", "send_attempt"]
|
|
|
|
|
|
|
|
responses:
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
200:
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
An SMS message has been sent to the specified phone number.
|
|
|
|
An SMS message has been sent to the specified phone number.
|
|
|
|
Note that this may be an SMS message containing the validation token or it may be informing
|
|
|
|
Note that this may be an SMS message containing the validation token or it may be informing
|
|
|
|
the user of an error.
|
|
|
|
the user of an error.
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {}
|
|
|
|
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
$ref: "../identity/definitions/sid.yaml"
|
|
|
|
|
|
|
|
403:
|
|
|
|
|
|
|
|
description: The homeserver does not permit the address to be bound.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "definitions/errors/error.yaml"
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {
|
|
|
|
|
|
|
|
"errcode": "M_THREEPID_DENIED",
|
|
|
|
|
|
|
|
"error": "Third party identifier is not allowed"
|
|
|
|
|
|
|
|
}
|
|
|
|
400:
|
|
|
|
400:
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
Part of the request was invalid. This may include one of the following error codes:
|
|
|
|
Part of the request was invalid. This may include one of the following error codes:
|
|
|
@ -378,7 +373,7 @@ paths:
|
|
|
|
post:
|
|
|
|
post:
|
|
|
|
summary: Requests a validation token be sent to the given email address for the purpose of resetting a user's password
|
|
|
|
summary: Requests a validation token be sent to the given email address for the purpose of resetting a user's password
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
Proxies the identity server API ``validate/email/requestToken``, but
|
|
|
|
Proxies the identity service API ``validate/email/requestToken``, but
|
|
|
|
first checks that the given email address **is** associated with an account
|
|
|
|
first checks that the given email address **is** associated with an account
|
|
|
|
on this Home Server. This API should be used to request
|
|
|
|
on this Home Server. This API should be used to request
|
|
|
|
validation tokens when authenticating for the
|
|
|
|
validation tokens when authenticating for the
|
|
|
@ -393,21 +388,61 @@ paths:
|
|
|
|
|
|
|
|
|
|
|
|
.. _/register/email/requestToken: #post-matrix-client-%CLIENT_MAJOR_VERSION%-register-email-requesttoken
|
|
|
|
.. _/register/email/requestToken: #post-matrix-client-%CLIENT_MAJOR_VERSION%-register-email-requesttoken
|
|
|
|
operationId: requestTokenToResetPasswordEmail
|
|
|
|
operationId: requestTokenToResetPasswordEmail
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
|
|
- in: body
|
|
|
|
|
|
|
|
name: body
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
|
|
- $ref: "../identity/definitions/request_email_validation.yaml"
|
|
|
|
|
|
|
|
- type: object
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
id_server:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The hostname of the identity service to communicate with. May
|
|
|
|
|
|
|
|
optionally include a port.
|
|
|
|
|
|
|
|
example: "id.example.com"
|
|
|
|
|
|
|
|
required: ['id_server']
|
|
|
|
responses:
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
200:
|
|
|
|
description: An email was sent to the given address
|
|
|
|
description: An email was sent to the given address.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "../identity/definitions/sid.yaml"
|
|
|
|
|
|
|
|
403:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The homeserver does not allow the third party identifier as a
|
|
|
|
|
|
|
|
contact option.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "definitions/errors/error.yaml"
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {
|
|
|
|
|
|
|
|
"errcode": "M_THREEPID_DENIED",
|
|
|
|
|
|
|
|
"error": "Third party identifier is not allowed"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
400:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The referenced third party identifier is not recognised by the
|
|
|
|
|
|
|
|
homeserver, or the request was invalid
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "definitions/errors/error.yaml"
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {
|
|
|
|
|
|
|
|
"errcode": "M_THREEPID_NOT_FOUND",
|
|
|
|
|
|
|
|
"error": "Email not found"
|
|
|
|
|
|
|
|
}
|
|
|
|
"/account/password/msisdn/requestToken":
|
|
|
|
"/account/password/msisdn/requestToken":
|
|
|
|
post:
|
|
|
|
post:
|
|
|
|
summary: Requests a validation token be sent to the given phone number for the purpose of resetting a user's password.
|
|
|
|
summary: Requests a validation token be sent to the given phone number for the purpose of resetting a user's password.
|
|
|
|
description: |-
|
|
|
|
description: |-
|
|
|
|
Proxies the identity server API ``validate/msisdn/requestToken``, but
|
|
|
|
Proxies the identity service API ``validate/msisdn/requestToken``, but
|
|
|
|
first checks that the given phone number **is** associated with an account
|
|
|
|
first checks that the given phone number **is** associated with an account
|
|
|
|
on this Home Server. This API should be used to request
|
|
|
|
on this Home Server. This API should be used to request
|
|
|
|
validation tokens when authenticating for the
|
|
|
|
validation tokens when authenticating for the
|
|
|
|
`account/password` endpoint. This API's parameters and response are
|
|
|
|
`account/password` endpoint. This API's parameters and response are
|
|
|
|
identical to that of the HS API |/register/msisdn/requestToken|_ except that
|
|
|
|
identical to that of the HS API |/register/msisdn/requestToken|_ except that
|
|
|
|
`M_THREEPID_NOT_FOUND` may be returned if no account matching the
|
|
|
|
`M_THREEPID_NOT_FOUND` may be returned if no account matching the
|
|
|
|
given email address could be found. The server may instead send an
|
|
|
|
given phone number could be found. The server may instead send an
|
|
|
|
SMS message to the given address prompting the user to create an account.
|
|
|
|
SMS message to the given address prompting the user to create an account.
|
|
|
|
`M_THREEPID_IN_USE` may not be returned.
|
|
|
|
`M_THREEPID_IN_USE` may not be returned.
|
|
|
|
|
|
|
|
|
|
|
@ -415,9 +450,49 @@ paths:
|
|
|
|
|
|
|
|
|
|
|
|
.. _/register/msisdn/requestToken: #post-matrix-client-%CLIENT_MAJOR_VERSION%-register-email-requesttoken
|
|
|
|
.. _/register/msisdn/requestToken: #post-matrix-client-%CLIENT_MAJOR_VERSION%-register-email-requesttoken
|
|
|
|
operationId: requestTokenToResetPasswordMSISDN
|
|
|
|
operationId: requestTokenToResetPasswordMSISDN
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
|
|
- in: body
|
|
|
|
|
|
|
|
name: body
|
|
|
|
|
|
|
|
required: true
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
|
|
- $ref: "../identity/definitions/request_msisdn_validation.yaml"
|
|
|
|
|
|
|
|
- type: object
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
id_server:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The hostname of the identity service to communicate with. May
|
|
|
|
|
|
|
|
optionally include a port.
|
|
|
|
|
|
|
|
example: "id.example.com"
|
|
|
|
|
|
|
|
required: ['id_server']
|
|
|
|
responses:
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
200:
|
|
|
|
description: An SMS message was sent to the given phone number.
|
|
|
|
description: An SMS message was sent to the given phone number.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "../identity/definitions/sid.yaml"
|
|
|
|
|
|
|
|
403:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The homeserver does not allow the third party identifier as a
|
|
|
|
|
|
|
|
contact option.
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "definitions/errors/error.yaml"
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {
|
|
|
|
|
|
|
|
"errcode": "M_THREEPID_DENIED",
|
|
|
|
|
|
|
|
"error": "Third party identifier is not allowed"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
400:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The referenced third party identifier is not recognised by the
|
|
|
|
|
|
|
|
homeserver, or the request was invalid
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
$ref: "definitions/errors/error.yaml"
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {
|
|
|
|
|
|
|
|
"errcode": "M_THREEPID_NOT_FOUND",
|
|
|
|
|
|
|
|
"error": "Phone number not found"
|
|
|
|
|
|
|
|
}
|
|
|
|
"/account/deactivate":
|
|
|
|
"/account/deactivate":
|
|
|
|
post:
|
|
|
|
post:
|
|
|
|
summary: "Deactivate a user's account."
|
|
|
|
summary: "Deactivate a user's account."
|
|
|
|