檢查使用限制類型¶
Retrieves the list of registered access restriction types. It returns operation policy restriction types (block_type_list) and temporary restriction types (temp_type_list) separately. Unregistered languages are displayed in English. See Authentication > Restriction > Type registration.
請求 URL¶
| 正式 URL | https://auth.qpyou.cn/v2/game/block/type/get |
|---|---|
| 沙盒 URL | https://sandbox-auth.qpyou.cn/v2/game/block/type/get |
| HTTP 方法 | POST |
| Content-Type | application/json |
| 資料格式 | JSON |
請求標頭¶
| 欄位名稱 | 說明 | 類型 | 必填 |
|---|---|---|---|
| X-Access-Token | 用於應用程式伺服器認證的 OAuth 2.0 Access Token (請參閱 發行 OAuth Token) | String | Y |
| ISCRYPT | 資料是否加密(0 = 不加密)(必須傳遞 0) | Integer | Y |
請求本文¶
| 欄位名稱 | 說明 | 類型 | 必填 |
|---|---|---|---|
| appid | App ID | String | Y |
| language | Language code (default: en)
| String | N |
請求範例¶
If you need to check popup text for a specific language, send the language code in language. type_name is always Korean, and type_en_name is always English.
回應本文¶
| 欄位名稱 | 說明 | 類型 |
|---|---|---|
| result_code | 回應代碼 詳情 | Integer |
| result_msg | 結果訊息 | String |
| token_validation | JWT 驗證結果(JWT 驗證錯誤) | Object |
| token_validation.result_code | JWT 驗證結果代碼 | Integer |
| token_validation.result_msg | JWT 驗證結果訊息 | String |
| data | 結果資料 | Object |
| data.block_type_list | Operation policy restriction type list | Array |
| data.block_type_list[].block_type | Restriction type number | Integer |
| data.block_type_list[].type_status | Restriction popup type (O: operation policy restriction) | String |
| data.block_type_list[].type_name | Restriction type name (fixed to Korean regardless of requested language) | String |
| data.block_type_list[].type_en_name | Restriction type name (fixed to English regardless of requested language) | String |
| data.block_type_list[].reason | Restriction reason (returned by language; unregistered languages use English) | String |
| data.temp_type_list | Temporary restriction type list | Array |
| data.temp_type_list[].block_type | Restriction type number | Integer |
| data.temp_type_list[].type_status | Restriction popup type (N: temporary restriction) | String |
| data.temp_type_list[].type_name | Restriction type name (fixed to Korean regardless of requested language) | String |
| data.temp_type_list[].type_en_name | Restriction type name (fixed to English regardless of requested language) | String |
| data.temp_type_list[].title | Temporary restriction popup title (returned by language; unregistered languages use English) | String |
| data.temp_type_list[].reason | Temporary restriction popup message (returned by language; unregistered languages use English) | String |
回應代碼¶
| Code value | 說明 |
|---|---|
| 0 | 成功 |
| 2499 | JWT 驗證失敗(請參閱 token_validation) |
| 4000 | 無效參數 |
| 6000 | 無效 appid |
回應範例¶
成功¶
If the request succeeds and result_code is 0, both data.block_type_list and data.temp_type_list are returned.
{"result_code":0,"result_msg":"SUCCESS","token_validation":{"result_code":0,"result_msg":"success"},"data":{"block_type_list":[{"block_type":1,"type_status":"O","type_name":"불법 프로그램 이용","type_en_name":"Usage of unauthorized programs","reason":"불법 프로그램 이용"}],"temp_type_list":[{"block_type":25,"type_status":"N","type_name":"임시 접속 제한(게임 데이터 수정)","type_en_name":"Temporary access restriction (game data modified)","title":"게임 이용에 불편을 드려 죄송합니다.","reason":"현재 게임 데이터를 수정하는 중입니다. 빠른 조치를 위해 최선을 다하겠습니다."}]}}
JWT validation failure¶
{
"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."
}
}
Note
JWT 驗證失敗時,可在 token_validation 欄位中查看詳細錯誤資訊。詳情請參閱 JWT 驗證錯誤代碼。