I am using Steam's API to fetch player data. To do this you need to provide a steamID64 (76561197960435530
) like this example shown here: /?appid=440&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&steamid=76561197960435530
however this can sometimes be tricky for my users as many have their own custom vanity url which does not provide the steamID64 for them to easily input. I know they could use use a website to look it up but this is not an option.
How would I take the input of a custom vanity profile URL like this: and convert this programatically into a steamID64 like this:
76561197960435530
I would like to implement this using JavaScript or by using an API.
I am using Steam's API to fetch player data. To do this you need to provide a steamID64 (76561197960435530
) like this example shown here: http://api.steampowered./ISteamUserStats/GetUserStatsForGame/v0002/?appid=440&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&steamid=76561197960435530
however this can sometimes be tricky for my users as many have their own custom vanity url which does not provide the steamID64 for them to easily input. I know they could use use a website to look it up but this is not an option.
How would I take the input of a custom vanity profile URL like this: https://steammunity./id/customNameHere
and convert this programatically into a steamID64 like this: 76561197960435530
I would like to implement this using JavaScript or by using an API.
Share Improve this question asked Jun 1, 2020 at 18:16 OrtovoxOrtovox 4521 gold badge12 silver badges18 bronze badges1 Answer
Reset to default 7Found the solution. Here it says you can use the following syntax to resolve a vanity url:
http://api.steampowered./ISteamUser/ResolveVanityURL/v0001/?key=XXXXXXXXXXXXXXXXXXXXXXX&vanityurl=userVanityUrlName
Don't quite know why it was hiding on the TF2 wiki though. I could have found it at https://steamapi.xpaw.me/#ISteamUser/ResolveVanityURL.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744700560a4588753.html
评论列表(0条)