Skip to main content

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

ParameterTypeRequiredDescription
platformstringRequiredPlatform (e.g., "aos", "ios")
device_idstringRequiredDevice unique ID
device_modelstringRequiredDevice model name
device_osstringRequiredDevice OS
device_languagestringRequiredDevice language (e.g., "KO", "EN")

Response Data

Items Array

Each block item includes the following information:

  • userId: User ID
  • Reason: Block reason
  • Permanent: Whether permanent block
  • ExpireDate: 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 code
  • Message: Error message
  • WithdrawalKey: 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 Permanent is "N" and ExpireDate is set. Blocked only until the specified date.
  • Permanent Block: When Permanent is "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.