Withdrawal Request
This API requests account withdrawal. The account is preserved during the withdrawal grace period.
URL Confirmation
This API uses the service-account.playnanoo.com domain.
API Information
- URL:
https://service-account.playnanoo.com/api/v20240401/token/withdrawal - Method:
PUT - Authentication Required: Yes
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | int | Required | Withdrawal grace period (in days) |
| account_token | string | Required | Account token |
| memo | string | Required | Withdrawal reason memo |
| 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") |
DeviceInfo Inheritance
The Req class for this API inherits from DeviceInfo. All properties of DeviceInfo are automatically included.
Response Data
Res Class
| Field | Type | Description |
|---|---|---|
| Status | string | Status value |
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 in withdrawal grace period)BlockKey: Key provided when the account is blocked (only provided for blocked accounts)
Member Withdrawal Request Class
using System;
using System.Collections;
using UnityEngine.Networking;
public class WithDrawal
{
static string path = "https://service-account.playnanoo.com/api/v20240401/token/withdrawal";
[Serializable]
public class Req : DeviceInfo
{
public int period;
public string account_token;
public string memo;
public IEnumerator Send(
int period,
string account_token,
string memo,
Action<Res> onSuccess,
Action<BaseResponse> onError)
{
if (period > 0) this.period = period;
if (!string.IsNullOrEmpty(account_token)) this.account_token = account_token;
if (!string.IsNullOrEmpty(memo)) this.memo = memo;
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 RequestWithdrawal(string accessToken, string reason)
{
WithDrawal.Req req = new WithDrawal.Req();
StartCoroutine(req.Send(
period: 7, // 7일 유예 기간
account_token: accessToken,
memo: reason,
onSuccess: res =>
{
Debug.Log($"회원 탈퇴 요청 완료: {res.Status}");
Debug.Log("7일 후 계정이 완전히 삭제됩니다.");
},
onError: (error) =>
{
Debug.LogError($"회원 탈퇴 요청 실패: [{error.ErrorCode}] [{error.Message}]");
}
));
}
Withdrawal Grace Period
When you request withdrawal, the account is preserved for the specified grace period (period). You can cancel the withdrawal by logging in or calling the recovery API during the grace period. After the grace period expires, the account and all data will be permanently deleted.