# 인증토큰 발급

## 인증토큰 발급

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/api/:companyId/login`&#x20;

이싸인온 API 사용시 필요한 사용자의 인증토큰을 발급합니다.

#### Path Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| companyId | string | 회사아이디       |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |

#### Request Body

| Name                 | Type   | Description |
| -------------------- | ------ | ----------- |
| header               | object |             |
| header.request\_code | string | 1001Q       |
| body                 | object |             |
| body.memb\_email     | string | 사용자이메일      |
| body.memb\_pwd       | string | 사용자비밀번호     |

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

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "성공적으로 로그인되었습니다.",
    "session_id": ""
  },
  "body": {
    "access_token": "{인증토큰}",
    "comp_id": "{회사아이디}",
    "device_id": "{디바이스아이디}",
    "expire_date": "{만료일}",
    "memb_email": "{사용자 이메일}"
  }
}
```

{% endtab %}
{% endtabs %}

## Request Body Example

```javascript
{
  "header": {
    "request_code": "1001Q"
  },
  "body": {
    "memb_email": "{사용자 이메일}",
    "memb_pwd": "{사용자 비밀번호}"
  }
}
```

## Response Body Example

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "성공적으로 로그인되었습니다.",
    "session_id": ""
  },
  "body": {
    "access_token": "{인증토큰}",
    "comp_id": "{회사아이디}",
    "device_id": "{디바이스아이디}",
    "expire_date": "{만료일}",
    "memb_email": "{사용자 이메일}"
  }
}
```

## Response Body  header.result\_code

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 로그인 정보가 정확하지 않습니다.                    |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 95   | 실패              | API를 호출할 수 없는 회사입니다. 관리자에게 문의해주세요.    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |


---

# 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://api.esignon.net/kor_20210407/issued/token.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.
