Authentication
This API links a request UUID with an account.
URL Confirmation
This API uses the service-account.playnanoo.com domain.
API Information
- URL:
https://service-account.playnanoo.com/api/v20240401/link - Method:
PUT - Authentication Required: Yes
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| request_uuid | string | Required | Request unique ID (UUID) |
| 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
Status: Link result status
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)
Custom Link Integration Class
using System;
using System.Collections;
using UnityEngine.Networking;
public class CustomLink
{
static string path = "https://service-account.playnanoo.com/api/v20240401/link";
[Serializable]
public class Req : DeviceInfo
{
public string request_uuid;
public string account_type;
public IEnumerator Send(
string request_uuid,
Action<Res> onSuccess,
Action<BaseResponse> onError)
{
if (!string.IsNullOrEmpty(request_uuid)) this.request_uuid = request_uuid;
this.account_type = "LINK";
yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: true,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}
[Serializable]
public class Res : BaseResponse
{
public string Status;
}
}
Usage Example
public void LinkCustomAccount(string uuid)
{
CustomLink.Req req = new CustomLink.Req();
StartCoroutine(req.Send(
request_uuid: uuid,
onSuccess: res =>
{
Debug.Log($"커스텀 계정 연동 완료: {res.Status}");
},
onError: (error) =>
{
Debug.LogError($"커스텀 계정 연동 실패: [{error.ErrorCode}] [{error.Message}]");
}
));
}
Usage Scenario
This API is used to link a specific request UUID with the currently logged-in account. For example, it can be used to link a UUID generated on a web page with a game client or for cross-platform account linking.