Validation (/auth)
Integration Guide > https://kakaogames.atlassian.net/wiki/x/-A0GLw
/auth/validation
Description
Verifies the validity of the accessToken and the player.
Method
POST
Request Headers
Name | Type | Mandatory | Description |
Content-Type | String | Y | "application/json;charset=UTF-8" |
appSecret | String | Y | App Secret |
Authorization | String | Y | Authorization: KakaoAK {ADMIN_KEY} |
kgAppId | String | Y | KG App ID |
platform | String (Enum) | Y | Access Platform (web, launcher, mobile, pc) |
accessToken | String | Y | Access Token |
playerId | String | N | Player ID. Used for comparison validation. |
Note for Launcher (Square) Users
The platform type for the platform access token in the launcher (Square) is "launcher".
When performing SDK login through the launcher (FKGTPlayer::LoginWithBridgeToken), the platform type for the access token is "pc".
Request Body
None
Response Status Code
Status Code | Status Code Description | Status Code Detailed Description |
---|---|---|
200 | Normal Response | Normal |
400 | Bad Request | Unparsable request data, missing mandatory parameters, or parameter type error |
401 | Unauthenticated | Authentication failed > Game Kick |
406 | Not Acceptable | Cannot process > Game Kick |
4xx (custom status) | Player Abnormal State | Re-login required to clear abnormal state > Game kick |
500 | Internal Server Error | Internal server system error |
503 | Service Unavailable | Service unavailable (e.g., internal server timeout) |
Response Body
Name | Type | Description |
---|---|---|
player | PlayerAllResponse | Player information |
PlayerAllResponse
Name | Type | Description |
---|---|---|
kgAppId | String | KG App ID |
playerId | String | Player ID |
status | String | Player status |
nickname | String | Nickname |
data | Map | Additional data |
Example Request
POST /service/v5/auth/validation HTTP/1.1
Host: kr-openapi-zinny3.game.kakao.com:10443
Content-Type: application/json;charset=UTF-8
appSecret: c3c38bbfa3828b342d946e9770c974d0
Authorization: KakaoAK 37faf519f278646a58a30ed73e6f8a61
kgAppId: 909428
platform: mobile
accessToken: FvNkGat8GaTfyhxHm2rNSFpn5UmvgBBU0kJYVc5kw5mP4lt4IwBFJKhINM0hSFPvnnjy0dlwoF128dDWOOLEWhTrefQ0zYDb3lzeG2uQuyOG1zKZKrwPFRpbNU6Ttno47txU3Slb8L/n6ayXqeAWAg7DtraptD3QLrylAoSNWl1SK3vsXnYy//gqI6i4gWT/ZnSswEHEvj6ooc8vR119IVs4mA== |
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"player": {
"kgAppId": "909428",
"playerId": "123456789123456",
"status": "normal"
}
}
// -29401, Invalid playerAccessToken
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"desc": "Token is invalid. (401.-29401)"
}
// -10103. Player Abnormal State - Protection State
HTTP/1.1 463
Content-Type: application/json;charset=UTF-8
{
"desc": "playerId There is a valid lockout. (463.-10103)",
"lockout": {
"kgAppId": "909428",
"idType": "playerId",
"id": "123456789123456",
"certMethod": "phone,card",
"reason": "",
"message": "",
"notificationOption": "alimtalk",
"memo": "",
"lockoutCode": "",
"lockoutSection": "mobile",
"regTime": 1680773813000
},
"player": {
"kgAppId": "909428",
"playerId": "123456789123456",
"status": "normal"
},
"token": {
"onetimeToken": "1IB+jHhULoYJASZR18QUTQw0pDBZVjvOith9KD8miWQNsOgw4GjCGTTJhsWNUJHcWrtHJfazZ7lmLlyx"
},
"redirectUri": {
"target": "lockout",
"lockout": "https://member.kakaogames.com/lockout?token=1IB%2BjHhULoYJASZR18QUTQw0pDBZVjvOith9KD8miWQNsOgw4GjCGTTJhsWNUJHcWrtHJfazZ7lmLlyx"
}
}
// -10102. Player Abnormal State - Sanction
Pending Unregistration
User does not exist
|