# 포트원 API 소개

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

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

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

### 포트원 API를 이용하기 위한 HTTP Header 설정을 안내합니다.

1. [**/users/getToken**](https://portone.gitbook.io/docs/api/rest-api-access-token) 에서 **API Key** & **API secret**을 사용해 <mark style="color:red;">**`access_token`**</mark>을 발급받습니다.
2. API 호출 시 <mark style="color:red;">**`access_token`**</mark>을 **`Authorization:`** <mark style="color:red;">**`access_token`**</mark> 또는 **`X-ImpTokenHeader:`** <mark style="color:red;">**`access_token`**</mark>으로 HTTP header를 통해 전달합니다.

{% hint style="info" %}
**Content-Type**

아포트가 제공하는 모든 API Content-Type은 아래와 같습니다.

**Application.json;charset=UTF-8**
{% endhint %}

{% hint style="warning" %}
**Agency 가맹점**

아포트 API 호출시 **`HTTP Header`** 에 아래 파라미터 설정이 필요합니다. 하위 가맹점(Tier)은 **Agent 계정의** <mark style="color:blue;">**`API key`**</mark> 와 <mark style="color:blue;">**`Secret`**</mark> 을 사용해야 합니다.

* **`"Tier" : "`** <mark style="color:red;">**`Tier code`**</mark>(하위 가맹점 Tier Code)"
  {% endhint %}

### API 명세 확인방법

포트원 API 응답부 명세를 자세히 확인 하기 위해서는 아래와 같이 **Response** 항목 \*\*HTTP Status \*\*<mark style="color:green;">**200**</mark> 항목 선택시 자세한 출력 명세를 확인할 수 있습니다.

![응답항목 예시](https://2409678497-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwWX2hlvRZLZrXeH1aacF%2Fuploads%2Fglbux7VkyT4vaza5Qb6H%2Fimage.png?alt=media\&token=d96decb6-a9e6-4994-b074-c739cd992c3a)

{% hint style="info" %}
**API Swagger 사이트**

포트원은 Swagger API 명세를 지원합니다.

\[\*\*[https://api.iamport.kr\*\*\]\\(https://api.iamport.kr)](<https://portone.gitbook.io/docs/api/https:/api.iamport.kr**]\\(https:/api.iamport.kr)>)
{% endhint %}
