Authenticates the user.
POST {{baseUrl}}/login
Authenticates the user, and issues an access token they can use to authorize themself in subsequent requests.
If the client does not supply a device_id
, the server must
auto-generate one.
The returned access token must be associated with the device_id
supplied by the client or generated by the server. The server may
invalidate any access token previously associated with that device. See
Relationship between access tokens and devices.
Request Body
{"type"=>"m.login.password", "identifier"=>{"type"=>"m.id.user", "user"=>"cheeky_monkey"}, "password"=>"ilovebananas", "initial_device_display_name"=>"Jungle Phone"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"user_id":"@cheeky_monkey:matrix.org","access_token":"abc123","device_id":"GHTYAJCE","well_known":{"m.homeserver":{"base_url":"https://example.org"},"m.identity_server":{"base_url":"https://id.example.org"}}}