question

Laurence Schinina avatar image
Laurence Schinina asked

How can i login with steam using PHP

So i recently found the phpsdk and i am trying to login with steam via a webrequest from my game. in this request i send the needed steam token how ever i am unsure how to set the data. Php is not my strong suit.

https://github.com/PlayFab/PhpSdk

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

·
Seth Du avatar image
Seth Du answered

You may implement the Sample Code and replace the existing login API there for testing.

To login with Steam, PlayFab provide LoginWithSteam API and you are able to set CreateAccount as true to create a new account if there is no existing one. You need to craft a request for PlayFab API and some properties are required otherwise params invalid related errors will be reported. Basically the request JSON will be like:

{

" SteamTicket":"xxxxxxxxxx",

"CreateAccount": true,

"TitleId":"xxxxx"

}

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.