Token Deletion
Delete the user push token registered on the server.
URL Verification
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/push/v20220701/remove - Method:
PUT - Authentication Required: Yes
Request Parameters
This API does not require additional request parameters.
Response Data
| Field | Type | Description |
|---|---|---|
| Status | string | Processing result status |
Code Example
void UMyGame::RemovePushToken()
{
// 플레이어 정보가 포함된 요청 바디 생성
TSharedPtr<FJsonObject> Body = FPlayNANOOHelper::CreateRequestBody();
// JSON 문자열 변환
FString JsonBody = FPlayNANOOHelper::ToJsonString(Body);
// HTTP 요청
TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(TEXT("https://service-api.playnanoo.com/push/v20220701/remove"));
Request->SetVerb(TEXT("PUT"));
FPlayNANOOHelper::SetCommonHeaders(Request, true); // 인증 토큰 포함
Request->SetContentAsString(JsonBody);
Request->OnProcessRequestComplete().BindLambda(
[](FHttpRequestPtr Req, FHttpResponsePtr Res, bool bSuccess)
{
if (bSuccess && Res.IsValid())
{
TSharedPtr<FJsonObject> JsonObject;
TSharedRef<TJsonReader<>> Reader = TJsonReaderFactory<>::Create(Res->GetContentAsString());
if (FJsonSerializer::Deserialize(Reader, JsonObject))
{
FString Status = JsonObject->GetStringField(TEXT("Status"));
UE_LOG(LogTemp, Log, TEXT("푸시 토큰 삭제 성공: %s"), *Status);
}
}
});
Request->ProcessRequest();
}
Token Deletion Timing
When a user logs out or completely disables push notifications, you can call this API to remove the push token from the server.
Re-registration Required
After deleting a token, you must re-register through the token save API to receive push notifications again.
Use Cases
- When user logs out
- Cleanup before app uninstall
- When completely disabling push notifications