Block History Lookup
This API retrieves account block reasons.
API Information
- URL:
https://service-account.playnanoo.com/api/v20221201/reason - Method:
PUT - Authentication Required: Yes
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| platform | string | Required | Platform (e.g., "aos", "ios") |
| device_id | string | Required | Device unique ID |
| device_model | string | Required | Device model name |
| device_os | string | Required | Device OS |
| device_language | string | Required | Device language (e.g., "KO", "EN") |
Response Data
Items Array
Each block item includes the following information:
userId: User IDReason: Block reasonPermanent: Whether permanent blockExpireDate: Block expiration date (if not permanent)
Unity C# Implementation
BaseResponse Class
Base class for all API responses.
public class BaseResponse
{
public string ErrorCode;
public string Message;
public string WithdrawalKey;
public string BlockKey;
}
Field descriptions:
ErrorCode: Error codeMessage: Error messageWithdrawalKey: Key required for recovery when the account is in withdrawal grace period (only provided for accounts pending withdrawal)BlockKey: Key provided when the account is blocked (only provided for blocked accounts)
Block Reason Lookup Class
using System;
using System.Collections;
using UnityEngine.Networking;
public class Reason
{
static string path = "https://service-api.playnanoo.com/block/v20221201/reason";
[Serializable]
public class Req : DeviceInfo
{
public string block_key;
public IEnumerator Send(string block_key, Action<Res> onSuccess, Action<BaseResponse> onError)
{
if (!string.IsNullOrEmpty(block_key)) this.block_key = block_key;
yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: false,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}
[Serializable]
public class Res : BaseResponse
{
public SerializeItems[] Items;
}
[Serializable]
public class SerializeItems
{
public string userId;
public string Reason;
public string Permanent;
public string ExpireDate;
public string TimeUntilExpire;
public string[] Services;
}
}
Usage Example
public void GetBlockReason()
{
Reason.Req req = new Reason.Req();
StartCoroutine(req.Send(
block_key: "차단시_받은_block_key",
onSuccess: res =>
{
if (res.Items != null && res.Items.Length > 0)
{
foreach (var item in res.Items)
{
Debug.Log($"사용자 ID: {item.userId}");
Debug.Log($"차단 사유: {item.Reason}");
Debug.Log($"영구 차단: {item.Permanent}");
Debug.Log($"남은 시간: {item.TimeUntilExpire}");
if (item.Permanent != "Y")
{
Debug.Log($"차단 만료일: {item.ExpireDate}");
}
}
}
else
{
Debug.Log("차단 내역이 없습니다.");
}
},
onError: (error) =>
{
Debug.LogError($"차단 사유 조회 실패: [{error.ErrorCode}] [{error.Message}]");
}
));
}
Block Types
- Temporary Block: When
Permanentis "N" andExpireDateis set. Blocked only until the specified date. - Permanent Block: When
Permanentis "Y". Remains blocked until unblocked.
Blocked Account
This API is used to check block reasons for blocked accounts. When a block error occurs during login attempts, you can call this API to display detailed block information to the user.