通过传递Steam用户名从Steam API检索SteamID

我想知道是否有一种方法,如果用户输入他们的“Steam用户名”,你就可以找到他们的' SteamID”。 我一直在查看“Steam API”并且没有找到关于此的信息。</ p>

我的想法是让用户将“Steam用户名”输入到框中并在提交时 表格,我能够向蒸汽网络服务发出请求,该服务将用户的“SteamID”返回给我。</ p>

我的问题与其他用户不同,因为我只想 只需输入Steam用户名即可进行搜索。 用户是否有CustomURL并不重要,因为当我将Steam用户名发送到'Web服务'时,它应该返回用户ID。</ p>

如果有人有任何 我可以非常感谢能够帮助我的信息。</ p>
</ div>

展开原文

原文

I am wondering is there a way that if a user enters their 'Steam Username' that you can then find their 'SteamID'. I have been looking all through the 'Steam API' and have found no information about this.

My idea was for a user to enter their 'Steam Username' into a box and when they submit the form, I am able to fire a request of to a steam web service which returns me back that user's 'SteamID'.

My question is abit different than other users as I just want to just search by entering the Steam Username. It should not matter if a user has got a CustomURL or not, as when I send the Steam Username to a 'Web Service' it should return back a users ID.

If anyone has any information that could help me with this it would be greatly appreciated.

doumen5491
doumen5491 Steam配置文件用户名是唯一的吗?
大约 5 年之前 回复
dou44481
dou44481 也许我误会了。我认为这解决了你的问题:你无法从某个人当前的昵称中获取steamID,因为昵称可以改变并且不是唯一的。-barsanuphe
大约 5 年之前 回复
doujie1917
doujie1917 您提供答案的链接会谈到CustomURL。我正在寻找的是用户可以搜索他们的Steam用户名,从那里它将返回SteamID
大约 5 年之前 回复
dpwuvfpu52502
dpwuvfpu52502 本网站不允许您使用Steam用户名来搜索ID?
大约 5 年之前 回复
dongyi2993
dongyi2993 显然不是您特定问题的解决方案,但您所描述的确切存在于此处:steamidfinder.com
大约 5 年之前 回复
drpqxogph15436713
drpqxogph15436713 可能由用户昵称重复获取steamID
大约 5 年之前 回复

2个回答

The Steam API is indeed not the best documented API.

I have done a similar task before and I found this page helpful:

The page also includes an example request URL, it looks like this:

http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/?key=YOU-API_KEY&vanityurl=USER_NAME
dongmi19720408
dongmi19720408 是的,该地址仅适用于自定义配置文件URL(vanityurl)而不是实际的登录名。
大约 5 年之前 回复
duanbangzhou7809
duanbangzhou7809 感谢您回复我。 当我收到您发布的URL时,添加我的API密钥并输入我的Steam用户名,我收到此消息。 {“回复”:{“成功”:42,“留言”:“不匹配”}}
大约 5 年之前 回复



在撰写本文时,这是不可能的。 API中没有用户搜索功能。</ p>

作为我自己的应用程序(C#)中的变通方法,我模拟了 Steam社区搜索页面并解析响应HTML。 请记住,AJAX请求需要来自页面设置的cookie的会话ID。</ p>
</ div>

展开原文

原文

At the time of writing this is not possible. There is no user search function in the API.

As a workaround in my own app (C#) I simulated the AJAX request made by the Steam Community search page and parsed the response HTML. Bear in mind that the AJAX request needs a session ID from a cookie that's set by the page.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问