Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
624 views
in Technique[技术] by (71.8m points)

api - Get SteamID by Steam Apikey

As described, I want to get the SteamID from the Steam apikey. I need this to verify the apikey users gave me after doing a Steam login to my website.

What I have tried so far is using the Steam Web Api documentation

I have tried almost every interface from the documentation. The most promising ones were from the IEconService e.g. GetTradeOffers or GetTradeHistory, they deliver a response only dependent on the apikey but they don't return the corresponding SteamID.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If anyone else comes across this problem here is the solution I'm using.

First of all I send a tradeoffer to the account logged in via Steam. Next, I use the interface DeclineTradeOffer to decline the trade with the apikey I'm trying to verify. If this interface responds with code 200, the trade is cancelled and the apikey belongs to the account logged in via Steam.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...