---
title: "Get the supported login types to authenticate users"
method: GET
path: "/_matrix/client/v3/login"
tags: ["Session management"]
---

# Get the supported login types to authenticate users

`GET /_matrix/client/v3/login`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v3/login`
- Auth: none declared
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v3/login/get.ts> (a function with typed inputs; its response is checked against the schema)

Gets the homeserver's supported login types to authenticate users. Clients
should pick one of these and supply it as the `type` when logging in.

## Response `200`

The login types the homeserver supports

- object
  - `flows` object[]: The homeserver's supported login types
    - `get_login_token` boolean: If `type` is `m.login.token`, an optional field to indicate to the unauthenticated client that the homeserver supports the [`POST /login/get_token`](https://spec.matrix.org/v1.19/client-server-api/#post_matrixclientv1loginget_token) endpoint. Note that supporting the endpoint does not necessarily indicate that the user attempting to log in will be able to generate such a token.
    - `type` string, required: The login type. This is supplied as the `type` when logging in.

## Other responses

- `404`: With `M_UNRECOGNIZED`: the homeserver does not support the legacy authentication API. (See [Authentication API discovery](https://spec.matrix.org/v1.19/client-server-api/#authentication-api-discovery).)
- `429`: This request was rate-limited.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
