Improve documentation around /account/whoami
Clarifies:
@@ -30,6 +30,12 @@ paths:
summary: Gets information about the owner of an access token.
description: |-
Gets information about the owner of a given access token.
+
+ If the owner of the access token is an application service,
+ the server should return the user ID making the request. The
+ server should respect the application service client/server API
+ extensions during this request. If the request is made for a
+ virtual user, the server should verify that it is registered.
operationId: getTokenOwner
security:
- accessToken: []
@@ -49,5 +55,29 @@ paths:
user_id:
type: string
description: The user id that owns the access token.
+ 401:
+ description:
+ The token is not recongized
+ examples:
+ application/json: {
+ "errcode": "M_UNKNOWN_TOKEN",
+ "error": "Unrecongised access token."
+ }
+ schema:
+ "$ref": "definitions/error.yaml"
+ 403:
+ description:
+ The appservice cannot masquerade the user or has not registered them.
+ examples:
+ application/json: {
+ "errcode": "M_FORBIDDEN",
+ "error": "Application service has not registered this user."
+ }
+ schema:
+ "$ref": "definitions/error.yaml"
+ 429:
+ description: This request was rate-limited.
+ schema:
+ "$ref": "definitions/error.yaml"
tags:
- User data
