LogInUsingMobileDeviceId failed to create new account


#1

Hi, I’m a first time ChilliConnect user, coming from GameSparks and PlayFab and I must say I’m currently really liking Chilli, well done! :slight_smile:

I bumped into an issue with the Unity SDK LogInUsingMobileDeviceId where a new player account is not created when the “CreatePlayer” flag is set to True. I get a “Login Not Found. The supplied player credentials were valid, but could not find a ChilliConnect player that has been linked to the account.” response.

Code looks something like:

Sdk.PlayerAccounts.LogInUsingMobileDeviceId(new LogInUsingMobileDeviceIdRequestDesc(m_DeviceId, m_Platform),
(request, response) =>
{
Debug.Log($“Successfully logged in with ChilliConnectID: {response.ChilliConnectId}”);
}, (request, error) =>
{
Debug.LogError(error.ErrorDescription);
});
}

I then tried to use the API Explorer to manually call the same LogInUsingMobileDeviceId with the same DeviceId and Platform and that seems to work as expected, creating a new account for those device credentials. Going back to the device and trying to login now seemed to work.
I’m using an Android device and checked my DeviceId and Platform seem to be valid, haven’t tested with iOS.

Should this be reported as a bug or I’m somehow misusing the endpoint?

Thanks!


#2

Hi - thanks for trying out Chilli!

I’m away from my dev laptop at the moment so can’t test this, but I think the CreatePlayer flag defaults to “false” - so you might need something like:

var request = new LogInUsingMobileDeviceIdRequestDesc(m_DeviceId, m_Platform);
request.CreatePlayer = true;

It may be that the API Explorer incorrectly defaults CreatePlayer to true when the SDK defaults to false - can you try that and see if it resolves your issue?

Thanks
Mike


#3

Hi Mike

I just realized the mistake was on my side, I had in fact created a request using those exact same 2 lines of code, I was just not using it that request object, and was still using the one I posted above :confused:

After fixing this and re-testing, it seems to be working as intended. Sorry for the trouble, maybe it would be best to delete this topic since its not really useful for anyone.

Thanks and keep up the great work!