I'm having trouble logging in with the LoginWithXbox function. I'm using Unity 2019.4.14f1, I've imported the Unity editor extensions, downloaded the Playfab SDK and added the Playfab Party add-on. I'm able to retrieve the required token but every time I try to login I get the following error:
/Client/LoginWithXbox: Could not determine a title id for this.
I've been testing the API with Postman and have verified that the token I'm sending is valid - I'm able to successfully login from there. After much experimentation I noticed that I get the same error using Postman if I remove the TitleId field from the body of the request.
I'm using the following code to try and log in. Any recommendations on how to successfully log in with this method would be appreciated.
var request = new LoginWithXboxRequest { XboxToken = token, TitleId = "XXXXX", CreateAccount = true }; PlayFabClientAPI.LoginWithXbox(request, OnLoginSuccess, OnLoginFailure);
Update - we're actually using Unity 2019.4.16f1 that supports GameCore. The PlayFab SDK we're using is UnitySDK-2.103.210125.
I used fiddler to look at the call to https://XXXX.playfabapi.com/ and it doesn't look like any of the parameters (XboxToken, TitleId or CreateAccount) are being included in the call, which would explain the error response.
How to I generate a valid API call that includes those parameters?
It looks like this may be caused by a bug in the Microsoft XCurl library that is resulting in the POST data not being sent out. Upgrading to Unity 2019.4.17f1 is supposed to fix the problem. I'm upgrading now and will report back.
Answer by stephencox · Feb 01, 2021 at 03:26 AM
Upgrading to Unity 2019.4.18f1 fixed the problem.
HTTP/1.1 400 Bad Request calling GetUserData 1 Answer
Unity plugin supporting multiple sessions at once (and multiple users)? 1 Answer
How can i signin with google play and playfab,How can I sign in with the new google play plugin. 1 Answer
How to get random playfabid,getting random player id (other player) 1 Answer