> For the complete documentation index, see [llms.txt](https://docs.lmtls.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lmtls.io/lmtls-tech-summary/readme.md).

# Authentication API

## Endpoint

> **Real Server :** [**https://auth.lmtls.io/v2**](https://auth.lmtls.io/v2)
>
> **Test Server :** [**https://test-auth.lmtls.io/v2**](https://test-auth.lmtls.io/v2)

## API References

### Authenticate

Log in using your ID and password.

{% openapi src="/files/I7UTtyfENaOW7jIaG9Sj" path="/auth/auth-user" method="post" %}
[auth.yaml](https://2667504946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu4UdzpLIKnDSuWxWyQFS%2Fuploads%2Fgit-blob-bcb496072e51a3ed2f49c6c456d013e6db1c7e70%2Fauth.yaml?alt=media)
{% endopenapi %}

* `userType` is ignored. Currently it is not used.
* You can authenticate through `id` and `password`.
* If there is a `token` value, the token validity period can be extended.
* If successful, you get a new JWT `token`. It also receives basic user information, such as user `name`, `userId`, `telNo`, and `email`.

#### Example

{% tabs %}
{% tab title="Request" %}

```bash
curl -X 'POST' \
  'https://test-auth.lmtls.io/v2/auth/auth-user' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "hong",
  "password": "1111"
}'
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZXN0Iiwicm9sZSI6IlJPTEVfVVNFUiIsImV4cCI6MTY2ODc3ODEwMCwidXNlciI6IjQ3MDA2MDM2NDRCNzAwMDQiLCJpYXQiOjE2NjYxODYxMDB9.QQ_J1KMG58wG5D4THOCoXHqQVNd2SQ8j...",
  "userId": "hong",
  "name": "Hong kil dong",
  "telNo": "010-1111-2222",
  "email": "hong@my.domain"
}
```

{% endtab %}
{% endtabs %}
