# Auth

## Login

<mark style="color:green;">`POST`</mark> `/api/auth/login`

&#x20;로그인 요청&#x20;

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| user\_id | string | test01      |
| password | string | 123456      |

{% tabs %}
{% tab title="200 return JWT token" %}

```
{ data: { token: token }, msg: "로그인 성공!" }
```

{% endtab %}

{% tab title="404  아이디 또는 비밀번호가 틀려서 생기는 로그인 실패" %}

```
{ msg: "계정 또는 비밀번호를 다시 확인해주세요." }
```

{% endtab %}

{% tab title="500   서버 문제로 인한 로그인 실패 " %}

```
{ msg: "로그인 실패" }
```

{% endtab %}
{% endtabs %}

## Signup

<mark style="color:green;">`POST`</mark> `/api/auth/signup`

&#x20;회원가입 요청&#x20;

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| user\_id | string | test01      |
| password | string | 123456      |
| name     | string | 홍길동         |

{% tabs %}
{% tab title="200  회원가입 성공 " %}

```
{ msg: "회원가입 되었습니다." }
```

{% endtab %}

{% tab title="400  이미 존재하는 아이디로 회원가입할 때 " %}

```
{ msg: "이미 사용중이거나 탈퇴한 아이디입니다." }
```

{% endtab %}

{% tab title="500   서버 문제로 인한 회원가입 실패 " %}

```
{ msg: "회원가입 실패" }
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eastshine94.gitbook.io/kakaoclone/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
