User di_hash lookup API¶
This API retrieves the di_hash value of a user who has successfully completed identity verification or adult verification. It returns the di_hash from the most recent identity verification or adult verification completed within the last year.
Request information¶
| Item | Description |
|---|---|
| Production URL | https://adult-auth.qpyou.cn/v2/external/auth/di_hash |
| Sandbox URL | https://sandbox-adult-auth.qpyou.cn/v2/external/auth/di_hash |
| HTTP Method | POST |
| Data Format | JSON |
HTTP header¶
| Item | Description |
|---|---|
| Content-Type | application/json;charset=utf-8 |
| X-Access-Token | OAuth 2.0 Access Token for app server authentication (See OAuth Token issuance) |
Note
Bearer token corresponds to the Hive authentication key in [App Center > Project Management > Game List - Select your company game > Game details > Basic information].
Request body¶
| Name | Type | Required (Mandatory: M, Optional: O) | Description |
|---|---|---|---|
| game_index | Integer | M | App Center game index |
| player_id | String | M | Player ID of the Hive account |
| auth_type | String | O | Authentication type identity: identity verification adult: adult verification If omitted, both identity and adult verification information is retrieved and returned. |
Response elements¶
| Name | Type | Required (Mandatory: M, Optional: O) | Description |
|---|---|---|---|
| result_code | Integer | M | Response code |
| result_msg | String | M | Result message for the response code |
| player_id | String | O | Player ID of the Hive account |
| di_hash | String | O | di_hash |
| verified_at | String | O | Time of adult verification |
| auth_type | String | O | Authentication type identity: identity verification adult: adult verification |
Example of retrieving di_hash for an adult-verified user¶
Request¶
To retrieve the di_hash of a user who has completed adult verification, include game_index and player_id in the request.
curl -L -v \
-d '{"game_index" : 539, "player_id": "30000056996"}' \
-d '{"game_index" : 539, "player_id": "30000056996", "auth_type": "identity"}' \
-H "Content-Type: application/json" \
-H "X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImEwYWZlYjZlLTllYWItY2ZiMC03ZTMxLTNhNzMyZTQ5In0.eyJwcm9qZWN0X2lkIjoiY29tLmNvbTJ1cy5oaXZlc2RrIiwidG9rZW5fdHlwZSI6ImFjY2Vzc190b2tlbiIsImdyYW50X3R5cGUiOiJ1c2VyIiwiaWF0IjoxNzg5NDA2NzI5LCJleHAiOjE3ODk0MTAzMjksImF1dGhfdmVyIjoidjQiLCJ1c2VyX2lkIjoyMDAwMDAzMTM0MSwiaXNfd2hpdGVsaXN0IjpmYWxzZX0.MgPO-e-Gm_dErRcfjVPKFdrh9M1ywqpU5aBmrFDZihzA5kKCw_QjPZv-Sb94LmbrzIqYuGQu29tIbX9DhJg_SpschZ4dihLx75pt5fSqYkzXMNHsbDjP-A7Yn0yjqP8f9w0DD0B_20Vbw6WfUUImNLQK0UpKu9Pd6cOILImDOn9YSkc1ozuzGQ04jgihwSxtP8cRTNGn53aB89CbSzYZbUqdUtyCOY9q1BXeIlrq_4zd_YWoPPQjPd3uD3wt3cVNg4nfNfQ55PDXPTn-QCm_HsfnL12wrNFnD-UW9SlCvM6TouoErNFrLaQ3sYvgsek-n47-bylvzTGa7GAvakwuog" \
https://sandbox-adult-auth.qpyou.cn/v2/external/auth/di_hash
Response¶
{
"result_code": 0,
"result_msg": "Success",
"player_id": "30000056996",
"di_hash": "0c7b9088fc80db0532e599ee444b176fb6dfeb035767f98cf960eb59777f04ce",
"verified_at": "2026-04-27 15:35:03",
"auth_type": "identity"
}
Response codes (API server)¶
| Code | Description | Message |
|---|---|---|
| 0 | Success | Success |
| 201 | Empty request | Request parameters are missing. |
| 202 | Invalid request parameter | Request parameters are invalid. |
| 209 | Header authentication failed | The authentication information does not match. Please check the information you entered again. |