Skip to content

Commit b8ea9f6

Browse files
turt2liverichvdh
authored andcommitted
Merge pull request #3166 from matrix-org/travis/spec/msc2033-whoami-deviceid
Spec device_id on whoami
2 parents 12af1b9 + e5759df commit b8ea9f6

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add `device_id` to `/account/whoami` response as per [MSC2033](https://github.com/matrix-org/matrix-doc/pull/2033).

data/api/client-server/whoami.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,23 @@ paths:
4747
The token belongs to a known user.
4848
examples:
4949
application/json: {
50-
"user_id": "@joe:example.org"
50+
"user_id": "@joe:example.org",
51+
"device_id": "ABC1234"
5152
}
5253
schema:
5354
type: object
5455
required: ["user_id"]
5556
properties:
5657
user_id:
5758
type: string
58-
description: The user id that owns the access token.
59+
description: The user ID that owns the access token.
60+
device_id:
61+
type: string
62+
description: |-
63+
Device ID associated with the access token. If no device
64+
is associated with the access token (such as in the case
65+
of application services) then this field can be omitted.
66+
Otherwise this is required.
5967
401:
6068
description:
6169
The token is not recognised

0 commit comments

Comments
 (0)