question

chunkydreams avatar image
chunkydreams asked

SteamInfo from GetUserAccountInfo missing the SteamActivationStatus ?

Hello,

I am trying to use the Get User Account Info in my cloudScript. This cloudScript is called when a user logged in using their linked Steam account. My problem is that I receive a SteamInfo as part of the UserInfo, but it contains only SteamId, SteamName, SteamCountry and SteamCurrency. I need acces to the SteamActivationStatus to check if the user owns the game.

I saw that this is an issue that was raised as far back as 2017 and again in 2020. Was this fixed? If not could you show how to workaround this problem with the Steam API? I don't know how to use it. What would a cloudscript that makes an http call to the steam API look like?

apisCloudScriptdocumentation
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
chunkydreams avatar image
chunkydreams answered

Never mind, I was able to solve my problem by calling Steam API directly from my cloudscript to verify ownership when I found this old post. If anyone needs to do the same, here is what I did:

In my cloud script I have this:

 var url = "https://partner.steam-api.com/ISteamUser/CheckAppOwnership/v2/?key=MY_STEAM_WEB_API_KEY&steamid=" + steamId + "&appid=MY_APP_ID";
 var httpMethod = "get";
 var contentType = "application/x-www-form-urlencoded; charset=UTF-8";
 var response = http.request(url, "get", null, "application/x-www-form-urlencoded; charset=UTF-8", null);

If you are not sure what your STEAM_WEB_API_KEY is like I was, it is the key you entered in Playfab to activate the Steam add on. Also, the steamId I get it using server.GetPlayerProfile() and in the ProfilaConstraints I set ShowLinkedAccounts to true. There might be a better way to get the user's steam id but this works for me.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.