Block History Inquiry
Retrieve account block reasons.
API Information
- URL:
https://service-api.playnanoo.com/block/v20221201/reason - Method:
PUT - Authentication Required: Yes
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| 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
Items Array
Each block item contains the following information:
userId: User IDReason: Block reasonPermanent: Permanent block statusExpireDate: Block expiration date (if not permanently blocked)
Code Example
void UMyGame::GetBlockReason(const FString& AccessToken, const FString& BlockKey)
{
// Create request data
TSharedPtr<FJsonObject> Body = MakeShareable(new FJsonObject());
if (!BlockKey.IsEmpty())
{
Body->SetStringField(TEXT("block_key"), BlockKey);
}
Body->SetStringField(TEXT("platform"), UGameplayStatics::GetPlatformName());
Body->SetStringField(TEXT("device_id"), FPlatformMisc::GetDeviceId());
Body->SetStringField(TEXT("device_model"), FPlatformMisc::GetDefaultDeviceProfileName());
Body->SetStringField(TEXT("device_os"), FPlatformMisc::GetOSVersion());
Body->SetStringField(TEXT("device_language"), FInternationalization::Get().GetCurrentCulture()->GetTwoLetterISOLanguageName());
// Convert to JSON string
FString JsonBody;
TSharedRef<TJsonWriter<>> Writer = TJsonWriterFactory<>::Create(&JsonBody);
FJsonSerializer::Serialize(Body.ToSharedRef(), Writer);
// HTTP request
TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(TEXT("https://service-api.playnanoo.com/block/v20221201/reason"));
Request->SetVerb(TEXT("PUT"));
FPlayNANOOHelper::SetCommonHeaders(Request, true); // Include authentication token
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))
{
const TArray<TSharedPtr<FJsonValue>>* ItemsArray;
if (JsonObject->TryGetArrayField(TEXT("Items"), ItemsArray))
{
for (const TSharedPtr<FJsonValue>& Item : *ItemsArray)
{
if (Item->Type == EJson::Object)
{
TSharedPtr<FJsonObject> ItemObj = Item->AsObject();
FString Reason, Permanent, ExpireDate;
ItemObj->TryGetStringField(TEXT("Reason"), Reason);
ItemObj->TryGetStringField(TEXT("Permanent"), Permanent);
ItemObj->TryGetStringField(TEXT("ExpireDate"), ExpireDate);
UE_LOG(LogTemp, Log, TEXT("Block reason: %s"), *Reason);
UE_LOG(LogTemp, Log, TEXT("Permanent block: %s"), *Permanent);
if (Permanent != TEXT("Y"))
{
UE_LOG(LogTemp, Log, TEXT("Block expiration date: %s"), *ExpireDate);
}
}
}
}
}
}
});
Request->ProcessRequest();
}
Block Types
Temporary block: Permanent is "N", Permanent block: Permanent is "Y"
Blocked Accounts
If you encounter a block error during login, you can use this API to retrieve detailed block information.