If MasterBattlerite pulls or changes their private REST API after this, you can thank me and the others who have bugged me for the API. I contacted MB about this but they never got back to me.

Since no one has figured out a way to get the SteamAuth token outside of running Battlerite 24/7 and pulling it from memory/files, here’s the private API MasterBattlerite uses, documented as best as I could in my several hours of testing.

ID Lookup:

https://masterbattlerite.com/profile/<username>/lookup

Returns the following if it’s a valid player

{"status":"success","player":{"id":12852,"user_id":"776084420145844224","name":"Battlerite","title":504,"avatar":39021}}

Returns the following if it’s not a valid player

{"status":"error","message":"We couldn\u0027t find a player with that name."}

Update Player by User ID:

https://masterbattlerite.com/profile/<user_id>/update

Returns the following if it hasn’t been updated recently

{"status":"success","job":"abcdefghijklmnopqrstuvwxyz313373"}

Returns the following if it has been updated recently

{"status":"error","message":"This player is already up to date."}

Returns the following if it’s not a valid player

{"status":"error","message":"We couldn\u0027t find a player with that ID."}

View Status of an update by Job:

https://masterbattlerite.com/profile/update/<job>

Returns the following if the job is completed

{"status":"success","result":4}

Returns the following if the job is invalid

{"status":"success","result":false}

If the job is still in progress, result will return 1 or 2. I am assuming that this is the status of MasterBattlerite’s XMLHttpRequest to the official BattleRite API.

View Player Statististics:

https://masterbattlerite.com/profile/<user_id>

Returns a server-rendered HTML page with the data. I have not found a private endpoint serving the raw JSON data.

You following me camera guy? You want to get a player’s fresh updated stats? Here’s the flow:

Do an ID Lookup with their username. Call Update Player with the returned user_id. Use the returned job to view the status of the update. Once the returned result is “4", query the actual profile page.

If there’s a mistake here, feel free to let me know. I’ve only played around with this for a day last month, but as far as I can tell, this still functions fine. Scraping the returned HTML is on you.

I hope Stunlock Studios sees the need for a public API so we can help grow the community with useful tools, as right now we are barricaded heavily behind a pretty strong wall.

Cheers.

tl;dr SLS plz.