# 토큰갱신

## 아이템 블록

카카오에서 발급 된 사용자 토큰은 유효기간이 짧습니다. 유효기간이 지나면 사용자가 다시 로그인 액션을 하지 않는 경우 해당 토큰을 사용할 수 없기 때문에, 앱에서 자동화 처리를 할 수 없습니다. 이 경우 <mark style="color:blue;">**Refresh Token**</mark> 을 저장해 두었다가 필요한 경우 토큰을 갱신하여 사용할 수 있습니다.

<figure><img src="/files/e4KScGIPWPeyFoxWCnlb" alt=""><figcaption></figcaption></figure>

## 설정 팝업

<figure><img src="/files/9d95hKWzOYlrsQwSGKm2" alt=""><figcaption></figcaption></figure>

## 설정 필드

### 앱 REST API 키

Kakao Developers 사이트에서 앱을 등록하고 발급받을 수 있습니다.&#x20;

내 애플리케이션 > 앱 설정 > 요약정보 경로에서 확인하세요.

### Refresh Token

최초 토큰 발급 시 사용자 토큰과 함께 발급이 됩니다. Refresh Token 은 시스템에 잘 저장해 두었다가 토큰이 만료되었을 때 자동화 처리를 이해 사용합니다.

### Client Secret

토큰 발급 시, 보안을 강화하기 위해 추가 확인하는 코드입니다.&#x20;

Kakao Developers 사이트의 \[내 애플리케이션] > \[보안]에서 설정 가능합니다. ON 상태인 경우 필수 설정해야 합니다.

## 응답

토큰 갱신 아이템의 응답은 아래 링크를 통해 카카오 API  개발문서를 참조해 주세요.

<https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#refresh-token-response>


---

# 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://docs.apidrag.com/kakao-api/references/kakao-login/refresh-token.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.
