admin管理员组文章数量:1390519
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.
本文标签: javascriptHow to resolve a steam custom vanity profile URL to steamID64Stack Overflow
版权声明:本文标题:javascript - How to resolve a steam custom vanity profile URL to steamID64 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744700559a2620539.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论