# 인증 관련 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 %}


---

# 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-v2/authorization.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.
