javascript - How to resolve a steam custom vanity profile URL to steamID64 - Stack Overflow

I am using Steam's API to fetch player data. To do this you need to provide a steamID64 (765611979

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 badges
Add a ment  | 

1 Answer 1

Reset to default 7

Found 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信