question

Monk Bit avatar image
Monk Bit asked

Create database record by name and devideID ,How to create account with username and deviceID??

Hello,

I want to create user (account in database) by username and deviceID
I mean, user write nickname into inputbox then click on submit button and then script create database record with his androiddeviceID and this nickname

Now i can only create it by DeviceID without name. like

var requestAndroid = new LoginWithAndroidDeviceIDRequest { AndroidDeviceId = ReturnMobileID(), CreateAccount = true}; PlayFabClientAPI.LoginWithAndroidDeviceID(requestAndroid, OnLoginMobileSuccess, OnLoginMobileFailure);

but I need also his name for publish in leaderboard.

,

Hello,

I want to create user (account in database) by username and deviceID
I mean, user write nickname into inputbox then click on submit button and then script create database record with his androiddeviceID and this nickname

Now i can only create it by DeviceID without name. like

var requestAndroid = new LoginWithAndroidDeviceIDRequest { AndroidDeviceId = ReturnMobileID(), CreateAccount = true}; PlayFabClientAPI.LoginWithAndroidDeviceID(requestAndroid, OnLoginMobileSuccess, OnLoginMobileFailure);

but I need also his name for publish in leaderboard.

Leaderboards and Statistics
10 |1200

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

jital avatar image
jital answered

Greetings,

Unfortunately, there does not exist an API call that allows both authentication with a device ID and adding a display name.

But all that you would need to do is have the player enter a display name into the field. Log them in with the device ID, once successfully logged in then make a call to UpdateDisplayName.

Finally you can add all this information into your database.

10 |1200

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

Monk Bit avatar image
Monk Bit answered

Oh thanks.

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.