---
description: >-
  This document explains how to use Authentication APIs. Authentication APIs use
  HTTP POST protocol and send and receive messages in JSON format.
---

# 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="https://2667504946-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu4UdzpLIKnDSuWxWyQFS%2Fuploads%2Fgit-blob-bcb496072e51a3ed2f49c6c456d013e6db1c7e70%2Fauth.yaml?alt=media" 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 %}
