Steps: (if you have the ProfileID skip to step 2)
- With the AccountID make a request to GET /webidentities/?accountIdList= from ProdTrackmania API and save the ProfileID
- With the ProfileID make a request to GET v3/profiles?profileId= from the UbiServices API and save the username.
Thanks to Breeku from showing me how I can play a ghost file on the Trackmania 2020. Check my question here and his method here
- Make a request to GET /mapRecords/?accountIdList= with the accountId, seasonId and mapIdList that you want to get.
- Grab the URL Link and download the file
- Change the extension to .gbx (the file will not have any extension when you download)
- Put on the Replays folder of your Trackmania Folder (normally located on your Documents Folder)
- Start the Trackmania 2020, go the Create Section -> Editor Replay -> Select YOUR REPLAY ON THE SAME MAP -> Edit
- Bottom Part of the editor with a clock symbol, you can read "Import Ghost", select and open the file you download
- Done!