본문으로 건너뛰기

탈퇴 계정 복구

탈퇴 유예 기간 중인 계정을 복구하는 API입니다.

URL 확인

이 API는 service-account.playnanoo.com 도메인을 사용합니다.

API 정보

  • URL: https://service-account.playnanoo.com/api/v20240401/withdrawal/restore
  • Method: PUT
  • 인증 필요: 아니오

요청 파라미터

파라미터타입필수설명
withdrawal_keystring필수탈퇴 키 (탈퇴 요청 시 발급됨)
platformstring필수플랫폼 (예: "aos", "ios")
device_idstring필수기기 고유 ID
device_modelstring필수기기 모델명
device_osstring필수기기 OS
device_languagestring필수기기 언어 (예: "KO", "EN")
DeviceInfo 상속

이 API의 Req 클래스는 DeviceInfo를 상속받습니다. DeviceInfo의 모든 속성이 자동으로 포함됩니다.

응답 데이터

Res 클래스

필드타입설명
Statusstring상태 값

Unity C# 구현

BaseResponse 클래스

모든 API 응답의 기본 클래스입니다.

public class BaseResponse
{
public string ErrorCode;
public string Message;
public string WithdrawalKey;
public string BlockKey;
}

필드 설명:

  • ErrorCode: 에러 코드
  • Message: 에러 메시지
  • WithdrawalKey: 탈퇴 유예 상태인 경우 복구에 필요한 키 (탈퇴 유예 중인 계정만 제공)
  • BlockKey: 차단된 계정인 경우 제공되는 키 (차단된 계정만 제공)

회원 탈퇴 취소 클래스

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

public class WithDrawalRestore
{
static string path = "https://service-account.playnanoo.com/api/v20240401/withdrawal/restore";

[Serializable]
public class Req : DeviceInfo
{
public string withdrawal_key;

public IEnumerator Send(
string withdrawalKey,
Action<Res> onSuccess,
Action<BaseResponse> onError)
{
if (!string.IsNullOrEmpty(withdrawalKey)) this.withdrawal_key = withdrawalKey;

yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: false,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}

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

사용 예제

public void RestoreWithdrawal(string withdrawalKey)
{
WithDrawalRestore.Req req = new WithDrawalRestore.Req();

StartCoroutine(req.Send(
withdrawalKey: withdrawalKey,
onSuccess: res =>
{
Debug.Log($"계정 복구 완료: {res.Status}");
Debug.Log("이제 정상적으로 게임을 이용할 수 있습니다.");
},
onError: (error) =>
{
Debug.LogError($"계정 복구 실패: [{error.ErrorCode}] [{error.Message}]");

if (error.ErrorCode == "WITHDRAWAL_PERIOD_EXPIRED")
{
Debug.LogError("유예 기간이 만료되어 계정을 복구할 수 없습니다.");
}
}
));
}
WithdrawalKey 얻기

withdrawal_key는 탈퇴 요청 시 또는 토큰 상태 확인 API를 통해 얻을 수 있습니다. 유예 기간 내에만 복구가 가능하므로, 유예 기간이 지난 후에는 계정을 복구할 수 없습니다.