# 인증 관련 API

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

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

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

## ⌨ API Key 방식으로 로그인

## API Key 방식으로 로그인

<mark style="color:green;">`POST`</mark> `https://api.portone.io/v2/signin/api-key`

API Key 방식으로 로그인

#### Request Body

| Name                                       | Type   | Description  |
| ------------------------------------------ | ------ | ------------ |
| api\_key<mark style="color:red;">\*</mark> | string | 사용자의 API Key |

{% tabs %}
{% tab title="200 로그인 성공" %}
{% tabs %}
{% tab title="Response" %}
**`access_token`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

인증 서버에서 인증된 사용자의 access token

***

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

인증 서버에서 인증된 사용자의 access token

***

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401 인증 실패" %}
{% tabs %}
{% tab title="Response" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

에러 코드

***

**`params`** <mark style="color:red;">**\***</mark> <mark style="color:red;">**object**</mark>

에러 세부사항

<details>

<summary>params</summary>

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

에러 메시지

***

</details>

***

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 서버 에러" %}
{% tabs %}
{% tab title="Response" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

에러 코드

***

**`params`** <mark style="color:red;">**\***</mark> <mark style="color:red;">**object**</mark>

에러 세부사항

<details>

<summary>params</summary>

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

에러 메시지

***

</details>

***

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## ⌨ 토큰 재발급

## 토큰 재발급

<mark style="color:green;">`POST`</mark> `https://api.portone.io/v2/token-regeneration`

리프레시 토큰을 이용한 토큰 재발급

#### Request Body

| Name                                             | Type   | Description                      |
| ------------------------------------------------ | ------ | -------------------------------- |
| refresh\_token<mark style="color:red;">\*</mark> | string | 새로운 token을 발급받기 위한 refresh token |

{% tabs %}
{% tab title="200 토큰 재발급 응답" %}
{% tabs %}
{% tab title="Response" %}
**`access_token`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

인증 서버에서 인증된 사용자의 access token

***

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

인증 서버에서 인증된 사용자의 access token

***

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401 유효하지 않은 refresh token" %}
{% tabs %}
{% tab title="Response" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

에러 코드

***

**`params`** <mark style="color:red;">**\***</mark> <mark style="color:red;">**object**</mark>

에러 세부사항

<details>

<summary>params</summary>

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

에러 메시지

***

</details>

***

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 서버 에러" %}
{% tabs %}
{% tab title="Response" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

에러 코드

***

**`params`** <mark style="color:red;">**\***</mark> <mark style="color:red;">**object**</mark>

에러 세부사항

<details>

<summary>params</summary>

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

에러 메시지

***

</details>

***

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}
