How the endpoint behaves
The releases endpoint returns the most recently published release of a product, not the highest version number. It is public, and a valid license key adds release notes and a signed download url for each file. Without a valid key the answer holds only version and published_at, so your game can still say that a new version exists.
Captured from the demo product, which has no release published:
{ "error": { "code": "not_found", "message": "This product has no published release yet." } }
That is a 404 and not a failure: treat it as “no update”. The update endpoint has its own budget of 120 requests per minute per IP address, separate from validation, and answers 429 with Retry-After: 60 past it.
The snippets follow the Unreal Engine 5.0 API reference and were not compiled in an engine project for this page.
Check for an update
Use the platform query so the answer lists only your files for this OS, plus files with no label. Clavem does not fix the label list: use whatever you typed when uploading. Put the key in the X-License-Key header, which keeps it out of URLs and logs.
static FString PlatformLabel()
{
// Check the exact strings your engine version returns, then match them to your upload labels.
const FString Name = UGameplayStatics::GetPlatformName();
return Name == TEXT("Mac") ? TEXT("macos") : Name.ToLower();
}
void UClavemUpdater::Check()
{
FClavemSaved Saved;
if (!LoadSaved(Saved)) { return; }
const FString Current = GetDefault<UGeneralProjectSettings>()->ProjectVersion; // Project Settings > Description
TSharedRef<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(FString::Printf(TEXT("https://clavem.io/v1/releases/%lld/latest?platform=%s"), Clavem::ProductId, *PlatformLabel()));
Request->SetVerb(TEXT("GET"));
Request->SetHeader(TEXT("X-License-Key"), Saved.Key);
Request->SetTimeout(8.f);
Request->OnProcessRequestComplete().BindWeakLambda(this, [this, Current](FHttpRequestPtr, FHttpResponsePtr Response, bool bConnected)
{
// 404: nothing published. 429: try again after Retry-After. Neither is worth an error dialog.
if (!bConnected || !Response.IsValid() || Response->GetResponseCode() != 200) { return; }
TSharedPtr<FJsonObject> Json;
FString Version, Notes;
if (!FJsonSerializer::Deserialize(TJsonReaderFactory<>::Create(Response->GetContentAsString()), Json) || !Json.IsValid()
|| !Json->TryGetStringField(TEXT("version"), Version) || !IsNewer(Version, Current))
{
return;
}
Json->TryGetStringField(TEXT("notes"), Notes); // absent without a valid license
const TArray<TSharedPtr<FJsonValue>>* Files = nullptr;
const bool bEntitled = Json->TryGetArrayField(TEXT("files"), Files) && Files->Num() > 0;
OnUpdateAvailable.Broadcast(Version, Notes, bEntitled); // a BlueprintAssignable delegate
});
Request->ProcessRequest();
}
When bEntitled is false, show the version and a renew or contact prompt. Do not show a dead Update button.
Compare versions
The endpoint returns a string, and deciding what is newer is up to you. This version reads dotted numbers and treats a -beta.2 tail as older than the release:
static bool IsNewer(const FString& A, const FString& B)
{
auto Parse = [](const FString& V, TArray<int32>& Out)
{
FString Core = V, Tail;
const bool bPre = V.Split(TEXT("-"), &Core, &Tail);
TArray<FString> Parts;
Core.ParseIntoArray(Parts, TEXT("."));
for (const FString& P : Parts) { Out.Add(FCString::Atoi(*P)); }
while (Out.Num() < 3) { Out.Add(0); }
return bPre;
};
TArray<int32> X, Y;
const bool bPreA = Parse(A, X), bPreB = Parse(B, Y);
for (int32 i = 0; i < 3; ++i) { if (X[i] != Y[i]) { return X[i] > Y[i]; } }
return bPreB && !bPreA;
}
Plain string comparison puts 3.10.0 before 3.9.2. I ran the same logic as a plain C++ port: 3.10.0 beat 3.9.2, 4.0.0 beat 4.0.0-beta.2, equal versions were not newer, and banana against 1.0.0 was not newer. For full SemVer rules, such as comparing two pre-release tags, use a library.
Download when the player clicks
Signed links last one hour and an update prompt can sit longer. Call Check() logic again on click, take files[0].url, then stream it to disk. Two Unreal details matter here. SetTimeout covers the entire request, so the 8 seconds used for API calls would cut a large download off; leave it out or give it a generous value. And SetResponseBodyReceiveStream writes the body straight to a file archive instead of holding it in memory.
void UClavemUpdater::DownloadFile(const FString& Url, const FString& Dest)
{
const FString Part = Dest + TEXT(".part");
const int64 Have = FMath::Max<int64>(IFileManager::Get().FileSize(*Part), 0);
TSharedRef<FArchive> Out = MakeShareable(IFileManager::Get().CreateFileWriter(*Part, Have > 0 ? FILEWRITE_Append : 0));
TSharedRef<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(Url);
Request->SetVerb(TEXT("GET"));
if (Have > 0) { Request->SetHeader(TEXT("Range"), FString::Printf(TEXT("bytes=%lld-"), Have)); }
Request->SetResponseBodyReceiveStream(Out);
Request->OnProcessRequestComplete().BindWeakLambda(this, [Part, Dest, Have, Out](FHttpRequestPtr, FHttpResponsePtr Response, bool bConnected)
{
Out->Close();
const int32 Status = (bConnected && Response.IsValid()) ? Response->GetResponseCode() : 0;
if (Status == 206 || (Status == 200 && Have == 0))
{
IFileManager::Get().Move(*Dest, *Part, true);
FPlatformProcess::LaunchFileInDefaultExternalApplication(*Dest); // then exit the game
}
else if (Status == 200 || Status == 416)
{
IFileManager::Get().Delete(*Part); // the server ignored Range, or the part file is stale: start over
}
// 403: the link expired. Ask the endpoint for a new one.
});
Request->ProcessRequest();
}
Clavem downloads support byte ranges, so a half-finished .part file resumes. A 200 where you asked for a range means the whole file was appended onto the part, hence the delete.
Applying the update
A running Windows executable cannot overwrite itself, so the usual path is to download an installer, launch it and quit. The code above does that with the default application for the file. If a store distributes your game, its own updater covers those players; this page is for builds you host yourself. Each uploaded file can be up to 5 GiB, so a larger build needs splitting into archives. Clavem has no delta updates and no auto-updater, and I found no checksum field in the release response, so verify what you download with a hash you publish yourself.
Doing this with Clavem
You upload each build in the dashboard with a version and a platform label, then publish it. The files docs cover limits, storage per plan and the one-hour links.
Questions
Does Clavem patch or auto-update my game?
No. It stores the build files you upload, tells your game which release is latest, and hands out signed download links. Replacing the installed game is up to your launcher or installer.
Why does the player see a version but no download button?
The endpoint answers with only the version and published date when the key is missing, invalid, expired or disabled. Files, notes and links appear only for a valid license of this product.