Merge pull request #3166 from matrix-org/travis/spec/msc2033-whoami-deviceid

Spec device_id on whoami
This commit is contained in:
Travis Ralston 2021-05-02 23:11:23 -06:00 committed by Richard van der Hoff
commit d41658e714
2 changed files with 11 additions and 2 deletions

View file

@ -0,0 +1 @@
Add `device_id` to `/account/whoami` response as per [MSC2033](https://github.com/matrix-org/matrix-doc/pull/2033).

View file

@ -47,7 +47,8 @@ paths:
The token belongs to a known user.
examples:
application/json: {
"user_id": "@joe:example.org"
"user_id": "@joe:example.org",
"device_id": "ABC1234"
}
schema:
type: object
@ -55,7 +56,14 @@ paths:
properties:
user_id:
type: string
description: The user id that owns the access token.
description: The user ID that owns the access token.
device_id:
type: string
description: |-
Device ID associated with the access token. If no device
is associated with the access token (such as in the case
of application services) then this field can be omitted.
Otherwise this is required.
401:
description:
The token is not recognised