> For the complete documentation index, see [llms.txt](https://help.citrusad.com/retail-media-interface/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.citrusad.com/retail-media-interface/partner/ko/partner-api-authentication/user-key-authentication.md).

# 사용자 키 토큰

## 토큰 요청하기

필요한 액세스 토큰을 받으려면 다음 파라미터를 사용하여 `/user-key-token` 엔드포인트로 요청을 보냅니다. HTTP 요청 본문에 UTF-8 문자 인코딩을 적용한 `application/x-www-form-urlencoded` 형식을 사용해야 합니다.

```http
POST https://auth.<env>.citrusad.com/v2/user-key-token
Content-Type: application/x-www-form-urlencoded
user_key=<USER_KEY>
```

다음 내용이 포함된 응답을 받게 됩니다: `accessToken`,`expiresIn`및 `tokenType`.

```json
{
    "accessToken": "ACCESS_TOKEN",
    "expiresIn": 84000,
    "tokenType": "Bearer"
}
```

{% hint style="info" %}
**access** 토큰은 다음에 액세스하는 데 사용됩니다. Epsilon Retail Media API.
{% endhint %}

## Refresh token

access 토큰이 만료되면 캠페인 API로부터 유효하지 않은 토큰 오류를 받게 됩니다. 이 경우 아래 다이어그램에 설명된 대로 refresh token을 사용하여 `/token` 엔드포인트에 요청을 해야 합니다.

<figure><img src="/files/vZ0iC9VhP38lIhN902k0" alt="Authentication refresh flow.png" width="100%"><figcaption></figcaption></figure>

일반적으로 사용자는 이전 토큰이 만료되거나 자신의 클레임에 연결된 리소스에 대한 액세스 권한을 얻거나 잃었을 때만 새 access 토큰이 필요합니다. 당사 API에 대한 모든 요청마다 새 access 토큰을 받기 위해 엔드포인트를 호출하는 것은 잘못된 방법입니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.citrusad.com/retail-media-interface/partner/ko/partner-api-authentication/user-key-authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
