Interface LoginResponse

Response body for POST /login request

interface LoginResponse {
    access_token: string;
    device_id: string;
    expires_in_ms?: number;
    home_server?: string;
    refresh_token?: string;
    user_id: string;
    well_known?: IClientWellKnown;
}

Properties

access_token: string

An access token for the account. This access token can then be used to authorize other requests.

device_id: string

ID of the logged-in device. Will be the same as the corresponding parameter in the request, if one was specified.

expires_in_ms?: number

The lifetime of the access token, in milliseconds. Once the access token has expired a new access token can be obtained by using the provided refresh token. If no refresh token is provided, the client will need to re-log in to obtain a new access token. If not given, the client can assume that the access token will not expire.

home_server?: string

The server_name of the homeserver on which the account has been registered.

Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.

refresh_token?: string

A refresh token for the account. This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.

user_id: string

The fully-qualified Matrix ID for the account.

well_known?: IClientWellKnown

Optional client configuration provided by the server. If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within. This object takes the same form as the one returned from .well-known autodiscovery.