Delete account¶
Deletes the Player ID associated with a specific user account.
The account deletion API operates through server-to-server communication, calling directly from the app server to the Hive authentication server. If the request is successful, a token for that Player ID and all IdP(Identity Provider) Delete link information. After deletion, automatic login or IdP login cannot be performed with the account.
The API provided for the ‘Delete Account’ function is as follows.
- Delete Account(Login status):
POST /v2/game/player/delete - Delete Account(No login required):
POST /v2/game/player/delete-project
Delete Account(Login status)¶
Used when a user deletes his or her account while logged in to the app.
Request URL¶
The data format of the request body and response is JSON. URL of the environment to be used POST Please request it using a method.
| environment | URL | HTTP Method | Content-Type |
|---|---|---|---|
| commercial | https://auth.qpyou.cn/v2/game/player/delete | POST | application/json |
| Sandbox | https://sandbox-auth.qpyou.cn/v2/game/player/delete | POST | application/json |
Request header¶
Authorizationcontains the user token, X-Access-TokenPlease pass the Access Token described below. ISCRYPTmust 0It must be passed on.
| field name | Description | type | Required? |
|---|---|---|---|
Authorization | User token returned after successful login from the app client. PlayerInfo.playerToken | String | Y |
X-Access-Token | OAuth 2.0 Access Token for user authentication. Returned after successful login PlayerInfo.accessToken | String | Y |
ISCRYPT | Whether your data is encrypted or not. 0means not encrypted, and must be 0pass to | Integer | Y |
Request body¶
Please provide the App ID, DID(Instance ID), and Player ID of the account you wish to delete.
| field name | Description | type | Required? |
|---|---|---|---|
appid | App ID | String | Y |
did | DID(Instance ID) | Integer | Y |
player_id | Player ID | BigInteger | Y |
Response body¶
result_codeCheck the result of account deletion with . If JWT verification fails token_validationCheck for detailed errors. What does the error mean? JWT validation error codeSee .
| field name | Description | type | location |
|---|---|---|---|
result_code | response code | Integer | response body |
result_msg | Result message | String | response body |
token_validation | JWT verification result (JWT validation error) | Object | response body |
token_validation.result_code | JWT verification result code | Integer | token_validation sub |
token_validation.result_msg | JWT verification result message | String | token_validation sub |
response code¶
Depending on the result of verification or deletion, the code below will be returned.
0: success2499: JWT verification failed.token_validationSee also5000: Server internal error7000: Invalid token7001:No token value in request header
Request example¶
This is an example of a request body specifying the account to be deleted. authentication token and ISCRYPTInclude it separately in the request header.
{
"appid": "com.com2us.hivesdk.normal.freefull.apple.global.ios.universal",
"did": 225697886,
"player_id": 10000000445
}
Response example¶
This is an example response depending on whether account deletion was successful or not.
success¶
This is an example of a response that successfully deleted an account.
{
"result_code": 0,
"result_msg": "SUCCESS",
"token_validation": {
"result_code": 0,
"result_msg": "success"
}
}
JWT validation failed¶
This is an example of a response where validation failed due to the JWT validity period expiring.
{
"result_code": 2499,
"result_msg": "JWT validation failed. See token_validation for details.",
"token_validation": {
"result_code": 2408,
"result_msg": "The access token is expired. Please refresh your token."
}
}
Delete Account(No login required)¶
Use this method to delete an account without requiring the user to log in. Authenticate with a Project JWT, which is an OAuth 2.0 Access Token for app server authentication, and a user token. This method also requires PlayerInfo.playerToken in Authorization.
Request URL¶
The data format of the request body and response is JSON. URL of the environment to be used POST Please request it using a method.
| environment | URL | HTTP Method | Content-Type |
|---|---|---|---|
| commercial | https://auth.qpyou.cn/v2/game/player/delete-project | POST | application/json |
| Sandbox | https://sandbox-auth.qpyou.cn/v2/game/player/delete-project | POST | application/json |
Request header¶
Authorizationcontains the user token, X-Access-TokenPlease pass the Access Token described below. ISCRYPTmust 0It must be passed on.
| field name | Description | type | Required? |
|---|---|---|---|
Authorization | User token returned after successful login from the app client. PlayerInfo.playerToken | String | Y |
X-Access-Token | OAuth 2.0 Access Token for app server authentication. Issue OAuth Token See also | String | Y |
ISCRYPT | Whether your data is encrypted or not. 0means not encrypted, and must be 0pass to | Integer | Y |
Request body¶
Please provide the App ID, DID(Instance ID), and Player ID of the account you wish to delete.
| field name | Description | type | Required? |
|---|---|---|---|
appid | App ID | String | Y |
player_id | Player ID | BigInteger | Y |
did | DID(Instance ID) | Integer | Y |
Response body¶
result_codeCheck the result of account deletion with . If JWT verification fails token_validationCheck for detailed errors. What does the error mean? JWT validation error codeSee .
| field name | Description | type | location |
|---|---|---|---|
result_code | response code | Integer | response body |
result_msg | Result message | String | response body |
token_validation | JWT verification result (JWT validation error) | Object | response body |
token_validation.result_code | JWT verification result code | Integer | token_validation sub |
token_validation.result_msg | JWT verification result message | String | token_validation sub |
response code¶
Depending on the result of verification or deletion, the code below will be returned.
0: success2499: JWT verification failed.token_validationSee also5000: Server internal error7000: Invalid token7001:No token value in request header
Request example¶
This is an example of a request body specifying the account to be deleted. authentication token and ISCRYPTInclude it separately in the request header.
{
"appid": "com.com2us.hivesdk.normal.freefull.apple.global.ios.universal",
"player_id": 100000001,
"did": 225697886
}
Response example¶
This is an example response depending on whether account deletion was successful or not.
success¶
This is an example of a response that successfully deleted an account.
{
"result_code": 0,
"result_msg": "SUCCESS",
"token_validation": {
"result_code": 0,
"result_msg": "success"
}
}
JWT validation failed¶
This is an example of a response where validation failed due to the JWT validity period expiring.