Kakao API
Kakao REST API provides access to Kakao Login, KakaoTalk messaging, friends list, maps, and AI features. Primary documentation is in Korean. English docs exist but are incomplete and lag behind Korean versions. No official Python/Node package — all integrations use REST API directly with app keys.
Warnings
- breaking Client secret is now enabled by default for all new REST API keys. Omitting client_secret in token requests causes KOE101 error.
- breaking Access tokens expire in 6 hours. Refresh tokens expire in 60 days (extendable to 2 months). Expired access token returns error code -401.
- gotcha Error codes are negative integers with no consistent pattern. code:-401 can mean token expired, token not found, or app key deactivated — check msg field for the actual cause.
- gotcha Primary documentation is in Korean at developers.kakao.com. English docs exist but are incomplete and often lag Korean versions by weeks.
- gotcha Token issuance rate limit returns KOE237 error. Not documented clearly in English docs.
- gotcha Scope/consent items must be pre-configured in Kakao Developers app settings before requesting. Missing scope returns -402 insufficient scopes error.
- gotcha Admin key has full permissions and must never be exposed client-side. Reissuing app keys is irreversible — all existing keys stop working immediately.
Install
-
pip install requests -
npm install axios
Imports
- Authorization header
Authorization: KakaoAK {REST_API_KEY} - User token auth
Authorization: Bearer {ACCESS_TOKEN}
Quickstart
import requests
# Get user info with access token
headers = {
'Authorization': f'Bearer {ACCESS_TOKEN}'
}
response = requests.get(
'https://kapi.kakao.com/v2/user/me',
headers=headers
)
print(response.json())