diff --git a/src/client.ts b/src/client.ts index 84602b493..79e48193e 100644 --- a/src/client.ts +++ b/src/client.ts @@ -8892,6 +8892,13 @@ export class MatrixClient extends EventEmitter { room.addThreadedEvent(event); }); } + + /** + * Fetches the user_id of the configured access token. + */ + public async whoami(): Promise<{ user_id: string }> { // eslint-disable-line camelcase + return this.http.authedRequest(undefined, "GET", "/account/whoami"); + } } /**