|
|
@ -201,3 +201,86 @@ paths:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
schema:
|
|
|
|
schema:
|
|
|
|
$ref: "../client-server/definitions/errors/error.yaml"
|
|
|
|
$ref: "../client-server/definitions/errors/error.yaml"
|
|
|
|
|
|
|
|
"/3pid/unbind":
|
|
|
|
|
|
|
|
post:
|
|
|
|
|
|
|
|
summary: Remove an association between a session and a Matrix user ID.
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
Remove an association between a session and a Matrix user ID.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future calls to ``/lookup`` for any of the session's 3pids will not
|
|
|
|
|
|
|
|
return the removed association.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The identity server should authenticate the request in one of two
|
|
|
|
|
|
|
|
ways:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1. The request is signed by the homeserver which controls the ``user_id``.
|
|
|
|
|
|
|
|
2. The request includes the ``sid`` and ``client_secret`` parameters,
|
|
|
|
|
|
|
|
as per ``/3pid/bind``, which proves ownership of the 3PID.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If this endpoint returns a JSON Matrix error, that error should be passed
|
|
|
|
|
|
|
|
through to the client requesting an unbind through a homeserver, if the
|
|
|
|
|
|
|
|
homeserver is acting on behalf of a client.
|
|
|
|
|
|
|
|
operationId: unbind
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
|
|
- in: body
|
|
|
|
|
|
|
|
name: body
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
type: object
|
|
|
|
|
|
|
|
example: {
|
|
|
|
|
|
|
|
"sid": "1234",
|
|
|
|
|
|
|
|
"client_secret": "monkeys_are_GREAT",
|
|
|
|
|
|
|
|
"mxid": "@ears:example.org",
|
|
|
|
|
|
|
|
"threepid": {
|
|
|
|
|
|
|
|
"medium": "email",
|
|
|
|
|
|
|
|
"address": "monkeys_have_ears@example.org"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
sid:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The Session ID generated by the ``requestToken`` call.
|
|
|
|
|
|
|
|
client_secret:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The client secret passed to the ``requestToken`` call.
|
|
|
|
|
|
|
|
mxid:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The Matrix user ID to remove from the 3pids.
|
|
|
|
|
|
|
|
threepid:
|
|
|
|
|
|
|
|
type: object
|
|
|
|
|
|
|
|
title: 3PID
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
The 3PID to remove. Must match the 3PID used to generate the session
|
|
|
|
|
|
|
|
if using ``sid`` and ``client_secret`` to authenticate this request.
|
|
|
|
|
|
|
|
properties:
|
|
|
|
|
|
|
|
medium:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
A medium from the `3PID Types`_ Appendix, matching the medium
|
|
|
|
|
|
|
|
of the identifier to unbind.
|
|
|
|
|
|
|
|
address:
|
|
|
|
|
|
|
|
type: string
|
|
|
|
|
|
|
|
description: The 3PID address to remove.
|
|
|
|
|
|
|
|
required: ['medium', 'address']
|
|
|
|
|
|
|
|
required: ["threepid", "mxid"]
|
|
|
|
|
|
|
|
responses:
|
|
|
|
|
|
|
|
200:
|
|
|
|
|
|
|
|
description: The association was successfully removed.
|
|
|
|
|
|
|
|
examples:
|
|
|
|
|
|
|
|
application/json: {}
|
|
|
|
|
|
|
|
schema:
|
|
|
|
|
|
|
|
type: object
|
|
|
|
|
|
|
|
400:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
If the response body is not a JSON Matrix error, the identity server
|
|
|
|
|
|
|
|
does not support unbinds. If a JSON Matrix error is in the response
|
|
|
|
|
|
|
|
body, the requesting party should respect the error.
|
|
|
|
|
|
|
|
404:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
If the response body is not a JSON Matrix error, the identity server
|
|
|
|
|
|
|
|
does not support unbinds. If a JSON Matrix error is in the response
|
|
|
|
|
|
|
|
body, the requesting party should respect the error.
|
|
|
|
|
|
|
|
501:
|
|
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
|
|
If the response body is not a JSON Matrix error, the identity server
|
|
|
|
|
|
|
|
does not support unbinds. If a JSON Matrix error is in the response
|
|
|
|
|
|
|
|
body, the requesting party should respect the error.
|
|
|
|