Skip to main content

Player Nickname Lookup

This API retrieves the current player's nickname.

URL Confirmation

This API uses the service-account.playnanoo.com domain.

API Information

  • URL: https://service-account.playnanoo.com/api/v20240401/nickname/get
  • 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")
DeviceInfo Inheritance

The Req class for this API inherits from DeviceInfo. All properties of DeviceInfo are automatically included.

Response Data

Res Class

FieldTypeDescription
NicknamestringCurrent nickname

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 in withdrawal grace period)
  • BlockKey: Key provided when the account is blocked (only provided for blocked accounts)

Nickname Lookup Class

using System;
using System.Collections;
using UnityEngine.Networking;

public class NicknameGet
{
static string path = "https://service-account.playnanoo.com/api/v20240401/nickname/get";

[Serializable]
public class Req : DeviceInfo
{
public IEnumerator Send(
Action<Res> onSuccess,
Action<BaseResponse> onError)
{
yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: true,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}

[Serializable]
public class Res : BaseResponse
{
public string Nickname;
}
}

Usage Example

public void GetNickname()
{
NicknameGet.Req req = new NicknameGet.Req();

StartCoroutine(req.Send(
onSuccess: res =>
{
Debug.Log($"현재 닉네임: {res.Nickname}");
},
onError: (error) =>
{
Debug.LogError($"닉네임 조회 실패: [{error.ErrorCode}] [{error.Message}]");
}
));
}