Skip to main content

login_route

Function login_route 

Source
pub(crate) async fn login_route(
    __arg0: State<State>,
    __arg1: ClientIp,
    body: Args<Request>,
) -> Result<Response>
Expand description

ยงPOST /_matrix/client/v3/login

Authenticates the user and returns an access token it can use in subsequent requests.

  • The user needs to authenticate using their password (or if enabled using a json web token)
  • If device_id is known: invalidates old access token of that device
  • If device_id is unknown: creates a new device
  • Returns access token that is associated with the user and device

Note: You can use GET /_matrix/client/r0/login to see supported login types.