Answer the question
In order to leave comments, you need to log in
How to get short steamid - STEAM_0:1: from long steam ID - 76561198846203651?
Hello, please help me, I am doing authorization on the site using steam and openid, how to get a short steam id from a long one?
Answer the question
In order to leave comments, you need to log in
Use this one https://github.com/b3none/steam-id-converter
can convert in both directions
directly, the conversion function looks like this https://github.com/b3none/steam-id-converter/blob/...
var steamId64 = 76561198032122624;
var universe = (steamId64 >> 56) & 0xFF;
if (universe == 1) universe = 0;
var accountIdLowBit = steamId64 & 1;
var accountIdHighBits = (steamId64 >> 1) & 0x7FFFFFF;
var legacySteamId = "STEAM_" + universe + ":" + accountIdLowBit + ":" + accountIdHighBits;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question