# 본인인증 요청 API

{% hint style="warning" %}
**Deprecated**

이 문서는 더 이상 관리되지 않습니다.

[PortOne 개발자센터](https://developers.portone.io/)를 이용해주세요.
{% endhint %}

### 사용자 개인정보를 입력하여 SMS OTP번호 발송 API 입니다.

## 본인인증을 위한 SMS OTP 번호를 발송합니다.

<mark style="color:green;">`POST`</mark> `https://api.iamport.kr/certifications/otp/request`

사용자 개인정보를 API로 전달하여 통신사로부터 확인되는 경우 OTP(6자리 인증번호)를 사용자에게 SMS로 전달합니다. 통신사 승인을 받은 일부 가맹점에 한해 사용하실 수 있으며 현재 **다날**을 통해서만 서비스되고 있습니다.

본인인증 대상자의 성명, 생년월일 + 주민등록 뒷부분 첫 자리, 휴대폰번호, 통신사 정보를 가맹점에서 직접 입력받아 API를 요청하면 됩니다. 전달된 개인정보가 올바른 경우 해당 휴대폰으로 인증번호 SMS가 전송됩니다.

HTTP Status 200응답 시 imp\_uid 가 응답데이터로 전달되며 SMS전송된 인증번호를 /certifications/otp/confirm/{imp\_uid} API 로 요청주시면 최종 본인인증 프로세스가 완료됩니다.

#### Request Body

| Name                                            | Type    | Description                                                                                                                                                                            |
| ----------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>          | String  | <mark style="color:red;">**본인인증 대상자 성명**</mark>                                                                                                                                        |
| phone<mark style="color:red;">\*</mark>         | String  | <p><mark style="color:red;"><strong>휴대폰번호</strong></mark></p><p>특수기호가 삽입되어도 무방합니다.</p>                                                                                                 |
| birth<mark style="color:red;">\*</mark>         | String  | <p><mark style="color:red;"><strong>생년월일</strong></mark></p><p><strong><code>YYYYMMDD 6자리</code></strong></p><p>특수기호가 삽입되어도 무방합니다.</p>                                                 |
| gender\_digit<mark style="color:red;">\*</mark> | String  | <p><mark style="color:red;"><strong>성별구분코드</strong></mark></p><p>주민번호 뒷부분 첫자리</p>                                                                                                      |
| carrier<mark style="color:red;">\*</mark>       | String  | <p><mark style="color:red;"><strong>통신사구분코드</strong></mark></p><p><strong><code>SKT</code></strong></p><p><strong><code>KT</code></strong></p><p><strong><code>LGT</code></strong></p> |
| is\_mvno                                        | Boolean | **알뜰폰 사용 여부**                                                                                                                                                                          |
| company                                         | String  | **가맹점 서비스명칭**                                                                                                                                                                          |
| merchant\_uid                                   | String  | **주문번호**                                                                                                                                                                               |
| pg                                              | String  | **PG사 구분코드**                                                                                                                                                                           |

{% tabs %}
{% tab title="200: OK 성공" %}
{% tabs %}
{% tab title="CertificationOTPResponse" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:purple;">**integer**</mark>

**응답코드**

0이면 정상적인 조회, 0 이 아닌 값이면 message를 확인해봐야 합니다

**`message`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**응답메세지**

code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다

**response (CertificationOTPAnnotation, optional)**
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="CertificationOTPAnnotation" %}
**`imp_uid *`** <mark style="color:green;">**`string`**</mark>

**`포트원 거래고유번호`**
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request 대상자 개인정보 중 일부가 누락되었거나 올바르지 않은 경우" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized 인증 Token이 전달되지 않았거나 유효하지 않은 경우" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error 처리 중 다날서버 응답오류 등 오류가 발생한 경우" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### **주요 요청 파라미터 상세 설명**

> **`gender_digit`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**`string`**</mark>
>
> **`셩별구분코드`**
>
> 주민등록번호 13자리 중 7번째 자리
>
> 2000년 이전 출생자는 1 또는 2, 2000년 이후 출생자는 3 또는 4

> **`carrier`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**`string`**</mark>
>
> **`통신사 구분코드`**
>
> 알뜰폰 사용자의 경우 <mark style="color:red;">**`carrier`**</mark>파라미터 SKT, KT, LGT 중 하나를 지정한 후
>
> **`is_mvno : true`** 로 설정

> **`company`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**`string`**</mark>
>
> **`가맹점 서비스명칭`**
>
> KISA에서 대상자에게 발송하는 SMS에 안내될 서비스 명칭

> **`pg`** <mark style="color:green;">**`string`**</mark>
>
> **`PG사 구분코드`**
>
> 다날 상점아이디를 2개 이상 동시에 사용하시려는 경우 설정하시면 됩니다.
>
> **danal.{상점아이디}** 형태로 지정

<details>

<summary>Response Model Schema</summary>

```json
{
  "code": 0,
  "message": "string",
  "response": {
    "imp_uid": "string"
  }
}
```

</details>

{% hint style="success" %}
**Swagger Test Link**

[**https://api.iamport.kr/#!/certifications/requestOTP**](https://api.iamport.kr/#!/certifications/requestOTP)
{% endhint %}


---

# 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://portone.gitbook.io/docs/api/api-5/api-2.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.
