question

Platanista Games avatar image
Platanista Games asked

Multiplayer 2.0 StartGame Procedure?

Hi,

I have a question about starting a application instance in new Multiplayer 2.0 server.

I already host my custom game server on playfab legacy server and whenever I need to start a instance of that application i just use PlayFabClientAPI.StartGame() function with buildVersion,region and gameMode and it worked successfully.

But in Multiplayer 2.0 server how can I start a instance?
I am using Unity.

Please suggest.

Thank You,
Saikat Mandal

apissdksCustom Game Servers
10 |1200

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

brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

@Platanista Games Using Servers 2.0, there are multiple ways to spin up a server and start a game. Perhaps the best way is to use Matchmaking, and have your Matchmaking Queue allocate the server and return the match server's details to the player. Alternatively, if you want to directly allocate one yourself in Unity, you can enable and use the RequestMultiplayerServer API.

2 comments
10 |1200

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

Platanista Games avatar image Platanista Games commented ·

I have called this api with this json text : {"BuildId":"4101a5e4-bebe-4d9b-9010-fc3dd2f23cc6","PreferredRegions":["EastUs"],"SessionId":"Mnx7ImkiOiIyMDIwLTAzLTE2VDEyOjQ4OjUyLjM5MDU1MjVaIiwiaWRwIjoiQ3VzdG9tIiwiZSI6IjIwMjAtMDMtMTdUMTI6NDg6NTIuMzkwNTUyNVoiLCJoIjoiRDY4NjQ0QzBBNEU1N0IwNSIsInMiOiJ0RVlBUHVWSHd5V2hKSXFBczhnelhTbFpzZXF0eHhvMEF3cHRCT2ZEZjFZPSIsImVjIjoidGl0bGVfcGxheWVyX2FjY291bnQhNDgwRUJFQUJCNzVERjAyRC9BNDE0Mi84RjFCRjhGQTk3MkFERjQvQkFBMjlFOTI3OEJCODIxNy8iLCJlaSI6IkJBQTI5RTkyNzhCQjgyMTciLCJldCI6InRpdGxlX3BsYXllcl9hY2NvdW50In0="}

But the error shows :-
{"code":401,"status":"Unauthorized","error":"NotAuthenticated","errorCode":1074,"errorMessage":"This API method does not allow anonymous callers."}

API :- https://A4142.playfabapi.com/MultiplayerServer/RequestMultiplayerServer

Please help

0 Likes 0 ·
Platanista Games avatar image Platanista Games Platanista Games commented ·

I think I am getting wrong session id which is not a valid guid.
Please check attached file :-
output.txt

0 Likes 0 ·
output.txt (1.7 KiB)
Platanista Games avatar image
Platanista Games answered

I am getting wring session id which is not a valid guid I think.
Please check @Platanista Games

{"EntityToken":{"Entity":{"Id":"BAA29E9278BB8217","Type":"title_player_account"},"EntityToken":"Mnx7ImkiOiIyMDIwLTAzLTE2VDEzOjU0OjEyLjcwOTg0NTlaIiwiaWRwIjoiQ3VzdG9tIiwiZSI6IjIwMjAtMDMtMTdUMTM6NTQ6MTIuNzA5ODQ1OVoiLCJoIjoiRDY4NjQ0QzBBNEU1N0IwNSIsInMiOiJ5SGZhTk00QldEeGF0VVpSZXdtbjlWdCs5ZnQrQjVQWmJKemRwNmdyS3d3PSIsImVjIjoidGl0bGVfcGxheWVyX2FjY291bnQhNDgwRUJFQUJCNzVERjAyRC9BNDE0Mi84RjFCRjhGQTk3MkFERjQvQkFBMjlFOTI3OEJCODIxNy8iLCJlaSI6IkJBQTI5RTkyNzhCQjgyMTciLCJldCI6InRpdGxlX3BsYXllcl9hY2NvdW50In0=","TokenExpiration":"2020-03-17T13:54:12.709Z"},"InfoResultPayload":null,"LastLoginTime":"2020-03-16T13:53:33.434Z","NewlyCreated":false,"PlayFabId":"8F1BF8FA972ADF4","SessionTicket":"8F1BF8FA972ADF4---A4142-8D7C9B1822FE56C-UuoJLXUiYx/GK/JzJc/fYNr1sOY+jmxLzevE25zdC+4=","SettingsForUser":{"GatherDeviceInfo":true,"GatherFocusInfo":true,"NeedsAttribution":false},"TreatmentAssignment":{"Variables":[],"Variants":[]},"AuthenticationContext":{"ClientSessionTicket":"8F1BF8FA972ADF4---A4142-8D7C9B1822FE56C-UuoJLXUiYx/GK/JzJc/fYNr1sOY+jmxLzevE25zdC+4=","PlayFabId":"8F1BF8FA972ADF4","EntityToken":"Mnx7ImkiOiIyMDIwLTAzLTE2VDEzOjU0OjEyLjcwOTg0NTlaIiwiaWRwIjoiQ3VzdG9tIiwiZSI6IjIwMjAtMDMtMTdUMTM6NTQ6MTIuNzA5ODQ1OVoiLCJoIjoiRDY4NjQ0QzBBNEU1N0IwNSIsInMiOiJ5SGZhTk00QldEeGF0VVpSZXdtbjlWdCs5ZnQrQjVQWmJKemRwNmdyS3d3PSIsImVjIjoidGl0bGVfcGxheWVyX2FjY291bnQhNDgwRUJFQUJCNzVERjAyRC9BNDE0Mi84RjFCRjhGQTk3MkFERjQvQkFBMjlFOTI3OEJCODIxNy8iLCJlaSI6IkJBQTI5RTkyNzhCQjgyMTciLCJldCI6InRpdGxlX3BsYXllcl9hY2NvdW50In0=","EntityId":"BAA29E9278BB8217","EntityType":"title_player_account"},"Request":{"CreateAccount":true,"CustomId":"37e486759d70b9018ab6b848cd79be9d53e3047c","EncryptedRequest":null,"InfoRequestParameters":null,"PlayerSecret":null,"TitleId":"A4142","AuthenticationContext":null},"CustomData":null}

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.