Dr. McKay Posted August 16, 2018 Report Posted August 16, 2018 It's now possible to generate a link to allow someone to add you as a friend without you needing to accept a request. These links look like http://s.team/p/user-id/token which redirects to https://steamcommunity.com/user/user-id/token You can also access a profile using https://steamcommunity.com/user/user-id which will just redirect you to /id/ or /profiles/, depending on whether the profile has a custom URL set. These user IDs look like aaa-aaaa. I don't know why it might be useful to convert a SteamID to friend-link user-id, but converting the user-id to a SteamID might be useful. The friend-link user-ids are just the account's accountid (the lower 32 bits in the 64-bit SteamID, or the x part in [U:1:xxxx]), encoded in hexadecimal, with some character replacements, and with a dash added. Here are the replacements: Hex = Letter ------------ 0 = b 1 = c 2 = d 3 = f 4 = g 5 = h 6 = j 7 = k 8 = m 9 = n a = p b = q c = r d = t e = v f = w To convert a SteamID to a user-id, encode the accountid in hex and perform string replacements for the above characters. The hyphen isn't necessary for a final URL to work. To convert a user-id to a SteamID, remove the dash and perform string replacements for the above characters. That gives you an accountid which you can turn into a SteamID using a platform-appropriate SteamID library. Metro, fawcghost and Robert Lutece 2 1
Recommended Posts