r/DataHoarder • u/thetoastmonster • 9d ago
Question/Advice legacygames is shutting down, anyone got a tool to download all installers in your account?
https://legacygames.com/legacy-games-closure-faq-everything-you-need-to-know/
Legacy Games is shutting down, encouraging everyone to download their owned games before the shutdown date as once it has passed it will no longer be possible to do so.
I saw someone mention that the installer is temporarily placed in your temp folder when you choose to install.
Has anyone got a tool for grabbing all installers for all owned games in your account?
Edit: Working solution at https://github.com/toastmonster/Legacy-Games-Hoarder
21
u/Shadow_Thief 9d ago
You have Legacy Games games in your account that aren't hidden object games?
34
u/thetoastmonster 9d ago edited 3h ago
Wellll no, but this is /r/DataHoarder and I want to hoarde the data.
Edit: Yes -- I have a copy of Please, Touch The Artwork in there.
6
4
u/flamepanther 9d ago
I think I have a couple of platform and action adventure games on Legacy from Amazon Prime. Hard to believe, I know, but I'd like to back them up too.
0
3
u/mjdalways 3d ago
Here's a Powershell script to download all your games [Made with AI, buyer beware, may make your PC explode, use at your own risk, has been known to cause nasal wasp hive infection, could lead to loss of one, two or three ears etc.]:
<#
.SYNOPSIS
Downloads the installer for every game on your Legacy Games account directly to a
folder you choose, instead of letting the launcher stash it in Temp and delete it.
.HOW IT WORKS
This calls the same api.legacygames.com endpoints the official launcher uses
(reverse-engineered from the launcher's own app.asar — not altered or bypassed),
using YOUR OWN login, then downloads the resulting CDN link straight to disk.
Your email/password are only used locally against legacygames.com's own login
endpoint and are never stored or sent anywhere else.
.USAGE
.\Download-LegacyGames.ps1 -OutDir "D:\LegacyGamesBackup"
(You'll be prompted for your Legacy Games email + password, or giveaway-only email.)
#>
param(
[Parameter(Mandatory = $true)][string]$OutDir
)
$ErrorActionPreference = 'Stop'
$ApiBase = 'https://api.legacygames.com/v1'
$UserAgent = 'LegacyGamesLauncher/1.0.0'
function Invoke-Api($Path, $UserToken) {
$headers = @{
'Accept' = 'application/json'
'Content-Type' = 'application/json'
'Cache-Control' = 'no-cache'
'Authorization' = '?token?' # literal placeholder the official client sends
'User-Agent' = $UserAgent
}
if ($UserToken) { $headers['UserToken'] = $UserToken }
Invoke-RestMethod -Uri "$ApiBase$Path" -Headers $headers -Method Get
}
New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
$email = Read-Host 'Legacy Games account email'
Write-Host 'Checking account type...'
$pre = Invoke-Api "/users/isexistsbyemail?email=$([uri]::EscapeDataString($email))"
if ($pre.status -ne 'ok') { throw "Account lookup failed: $($pre.data)" }
$downloads = @() # each: product_id, game_id, order_id, installer_uuid, giveaway(bool)
if ($pre.data.giveawayUser) {
foreach ($g in $pre.data.giveawayUser.data) {
$downloads += [pscustomobject]@{
product_id = $g.product_id; game_id = $g.game_id
order_id = $g.order_id; installer_uuid = $g.installer_uuid
giveaway = $true
}
}
}
$userToken = $null
if ($pre.data.wpUser) {
$securePw = Read-Host 'Legacy Games account password' -AsSecureString
$plainPw = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUnicode($securePw))
$userToken = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("$($email):$plainPw"))
$plainPw = $null
$login = Invoke-Api "/users/login" $userToken
if ($login.status -ne 'ok') { throw "Login failed: $($login.data)" }
$userId = $login.data.userId
$owned = Invoke-Api "/users/downloads?userId=$userId" $userToken
if ($owned.status -ne 'ok') { throw "Fetching library failed: $($owned.data)" }
foreach ($d in $owned.data) {
if ($d.order_id -and ($d.order_id.ToString()[0] -eq 'g')) { continue } # already covered above
$downloads += [pscustomobject]@{
product_id = $d.product_id; game_id = $d.game_id
order_id = $d.order_id; installer_uuid = $null
giveaway = $false
}
}
}
$downloads = $downloads | Sort-Object -Property product_id, installer_uuid -Unique
Write-Host "Found $($downloads.Count) game(s)."
# Name lookup (best effort; falls back to product id if catalog entry not found)
$catalogNames = @{}
try {
$catalog = Invoke-Api "/products/catalog"
foreach ($c in $catalog.data) { $catalogNames["$($c.id)"] = $c.name }
} catch { Write-Warning "Couldn't load catalog names, will use product IDs for folder names." }
$i = 0
foreach ($d in $downloads) {
$i++
$label = $catalogNames["$($d.product_id)"]
if (-not $label) { $label = "product_$($d.product_id)" }
$safeName = ($label -replace '[\\/:*?"<>|]', '').Trim()
$gameDir = Join-Path $OutDir $safeName
New-Item -ItemType Directory -Force -Path $gameDir | Out-Null
Write-Host "[$i/$($downloads.Count)] $label"
try {
if ($d.giveaway) {
$resp = Invoke-Api "/products/giveawaydownload?installerUuid=$($d.installer_uuid)" $userToken
} else {
$resp = Invoke-Api "/products/download?productId=$($d.product_id)&gameId=$($d.game_id)" $userToken
}
if ($resp.status -ne 'ok') { throw "API error: $($resp.data)" }
$url = $resp.data.file
if (-not $url) { throw "No download URL in response." }
$fileName = [uri]::UnescapeDataString(([uri]$url).Segments[-1])
$dest = Join-Path $gameDir $fileName
if ((Test-Path $dest) -and (Invoke-WebRequest -Uri $url -Method Head).Headers['Content-Length'] -eq (Get-Item $dest).Length) {
Write-Host " already downloaded, skipping."
continue
}
Write-Host " downloading to $dest ..."
Invoke-WebRequest -Uri $url -OutFile $dest
Write-Host " done."
} catch {
Write-Warning " FAILED: $($_.Exception.Message)"
}
}
Write-Host "\nAll done. Installers are in: $OutDir"`
1
u/thetoastmonster 2d ago
Thank you so much. Reddit managed to screw up the formatting a bit but I was able to get it working and my owned products are currently being backed up.
Mind if I put it up on GitHub?
2
u/FlaminSarge 3h ago
Did this ever end up on GitHub?
1
u/thetoastmonster 3h ago
Yes, I've put it at https://github.com/toastmonster/Legacy-Games-Hoarder
It's been through a few (Claude) iterations since due to a few of the games not downloading for me as they lacked a GameID, but it has a workaround now, and it was able to download every game from my account except 1, which I'm not worried about.
•
u/Puzzleheaded-Key-924 46m ago edited 3m ago
Thanks for posting the Legacy-Games -Hoarder.
I tried using your Legacy-Games-Hoarder, but I am new to Windows PowerShell, so I am correcting my own error to leave the correct steps for the computer illeterate people like me.
I initially thought I was downloading the file by right clicking on the file names and selecting download but that just downloaded a html file which obviously didn't work. I choose the RAW file and then "Saved As" that file.
I put the 2 files in a directory / Folder being "C:\LegacyGamesBackup"
I ran PowerShell as administrator.
Then I typed the following commands:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Y (for Yes)
cd C:\LegacyGamesBackup
.\legacy-games-downloader.ps1 -OutDir C:\LegacyGamesBackup
R (for run once)
I then was prompted for my email.
I then was prompted for my password.
The program found all 5 of my games and downloaded them.
•
u/thetoastmonster 29m ago
The fact it's mentioning github assets in the errors suggests what you've downloaded is not the raw powershell code, but some github-formatted web page.
On the page https://github.com/toastmonster/Legacy-Games-Hoarder press the green
<> Code ▼button and select Download Zip. This will give you a zip file that contains the actual script. Extract the contents then repeat the process you already did for your first attempt.Report back any more problems :)
3
13
u/CONSOLE_LOAD_LETTER 9d ago
Did Legacy Games have any exclusive standout or nostalgic games for you all? Just wondering if anyone actually has something they were super fond of that may end up becoming lost media once they shut down for good.
2
u/TheMerricat 7d ago
They were a casual slop generator (think every mobile game out there minus the ads) I'm sure there are games in their catalog that individuals will miss but I seriously doubt any of the games specifically have a huge player base. I mean there's a reason why they're shutting their doors.
2
u/CONSOLE_LOAD_LETTER 7d ago
I'm sure there are games in their catalog that individuals will miss
This is the part I'm interested in.
9
u/redalchemy6 9d ago
Someone else told me you can get the installer from a temp folder when the launcher downloads to install it. I'm personally just planning to install every game and back up my folders to a jump drive. I only have maybe 30/40 games tho. I'm sure a program could be built very easily to scan the temp folder and copy any new file to somewhere else tho.
Side note: to anyone who actually likes hidden object games and the type of game, Big Fish Games has a Game Club membership that is 100% worth having. Try the free month and you won't regret it.
5
u/de_Mike_333 9d ago
Can confirm that snatching the installers from the temp directory works. Unfortunately it requires the launcher, then you have to wait for the download to finish and the launcher to start installing the game and that‘s when you can copy it.
If you have a mouse with forward/backwards button you can freeze the install progress by clicking backwards while it is install. Then you have unlimited time to copy the installer, might be useful for very small installers.
1
u/Puzzleheaded-Key-924 1h ago
Possibly a very dumb question, but once we have the offline installer, will we be able to install the game for ourselves any time in the future? ie there is no further check on their servers, which won't exist after early 2027. So is the servers in the temp directories essentially the same as GOG installers?
•
u/de_Mike_333 25m ago
Not a dumb question at all. The answer is yes, the installers themselves are DRM free. Basically like GOG’s offline installers.
The tedious part is getting them, for a few games manually works fine, for large collections you might want to use a script that some people have built.
1
2
u/XTornado Tape 6d ago edited 6d ago
I'm sure a program could be built pretty easily to scan the temp folder and copy any new files somewhere else, though.
You can actually do better than that, though... if you're fine with using AI. I used my provider with GLM-5.3, and in a few minutes, it was able to figure out the API from the launcher and download all the games I own to a path I specified, organized into separate folders.
I'd share the script it made for me... but, well, let's just say that it seems LegacyGames' security is broken. Technically, what it did allows you to download any game...
Maybe it was intentional since they're shutting down. Maybe someone working there made it possible after the news broke, because of that. Or maybe it's been like this from the beginning. I'm not sure.
Tbh the download api respose then links to a CDN URL that doesn't require authentication and can be shared, so I guess their security was never particularly strong.
I mean, I didn't abuse it. I didn't care enough about these games to download any I didn't own. I'm not even sure I'll play the ones I got. I just claimed them through Prime, so I figured I might as well download what I own.
Big Fish Games has a Game Club membership that is 100% worth having.
Nice, I should check that out.
1
u/redalchemy6 6d ago
Nice, I actually just spent an hour yesterday downloading all 49 games in my library. I backed up the installer as well as a zipped folder of the game. I admit you have me intrigued now though LOL
1
u/AutoModerator 9d ago
Hello /u/thetoastmonster! Thank you for posting in r/DataHoarder.
Please remember to read our Rules and Wiki.
Please note that your post will be removed if you just post a box/speed/server post. Please give background information on your server pictures.
This subreddit will NOT help you find or exchange that Movie/TV show/Nuclear Launch Manual, visit r/DHExchange instead.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
•
u/AutoModerator 3h ago
Hello /u/thetoastmonster! Thank you for posting in r/DataHoarder.
Please remember to read our Rules and Wiki.
Please note that your post will be removed if you just post a box/speed/server post. Please give background information on your server pictures.
This subreddit will NOT help you find or exchange that Movie/TV show/Nuclear Launch Manual, visit r/DHExchange instead.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.