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

# User

## SignUp

<mark style="color:green;">`POST`</mark> `http://15.165.197.67:5000/user/signup`

&#x20;회원가입 용 엔드포인트로 email, password를 데이터로 받습니다.&#x20;

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| email    | string |             |
| password | string |             |

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

```
{ "message": "Successful" }
```

{% endtab %}

{% tab title="404  회원가입 실패    " %}

```
{ "message": "Failed" }
```

{% endtab %}

{% tab title="409  이미 존재하는 이메일을 입력" %}

```
{ "message": "Already exists" }
```

{% endtab %}
{% endtabs %}

## SignIn

<mark style="color:green;">`POST`</mark> `http://15.165.197.67:5000/user/signin`

로그인 용 엔드포인트로 email, password를 데이터 받습니다.

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| email    | string |             |
| password | string |             |

{% tabs %}
{% tab title="200  로그인 성공" %}

```
{ "message": "Successful", "id": 1, "token": "user's token value" }
```

{% endtab %}

{% tab title="404  존재하지 않는 유저   " %}

```
{"message": "unvalid user"}
```

{% endtab %}
{% endtabs %}

## Google SignIn

<mark style="color:green;">`POST`</mark> `http://15.165.197.67:5000/user/social/signin`

&#x20;구글 로그인용 엔드포인트로 idToken 값을 받습니다.&#x20;

#### Request Body

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| idToken | string |             |

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

```
{ "message": "Successful", "email":"gyu23@gmail.com", "id": 1, "token": "user's token value" }
```

{% endtab %}

{% tab title="404 " %}

```
{"message": err.message }
```

{% endtab %}
{% endtabs %}

## Change Password

<mark style="color:green;">`POST`</mark> `http://15.165.197.67:5000/user/newpwd`

&#x20;비밀번호 변경을 위한 엔드포인트로 password와 newpassword 받습니다.

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

#### Request Body

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| newpassword | string |             |
| password    | string |             |

{% tabs %}
{% tab title="200  패스워드 변경 성공  " %}

```
{ "message": "Successful" }
```

{% endtab %}

{% tab title="403  토큰정보를 서버에서 확인할 수 없는 경우  " %}

```
{"message": err.message }
```

{% endtab %}

{% tab title="404  패스워드 변경 실패  " %}

```
{"message": "Failed" }
```

{% endtab %}

{% tab title="409  일치하지 않는 패스워드를 입력 " %}

```
{ "message": "Wrong Password" }
```

{% endtab %}
{% endtabs %}

## delete user

<mark style="color:red;">`DELETE`</mark> `http://15.165.197.67:5000/user/delete`

&#x20;회원 탈퇴 위한 엔드 포인트 입니다.

#### Headers

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| token | string |             |

{% tabs %}
{% tab title="200  회원탈퇴 성공 " %}

```
{ "message": "Successful" } 
```

{% endtab %}

{% tab title="403  토큰정보를 서버에서 확인할 수 없는 경우 " %}

```
{ "message": err.message }
```

{% endtab %}

{% tab title="404  회원탈퇴 실패  " %}

```
{ "message": "Failed" }
```

{% endtab %}
{% endtabs %}
