question

brendan avatar image
brendan asked

Can't create users

kotorna
started a topic on Wed, 18 February 2015 at 2:39 PM

Hi guys,

Im trying to set up a demo project to understand how the platform works, and I cant create new users.
It seems that im hitting the main DB as "test","admin", etc are all existing users.

Checking the configs Im sending correctly the info to the servers but something seems to be failing...

Here is what Unity is showing me as error:

"Got an error: UsernameNotAvailable

UnityEngine.Debug:Log(Object)

PlayFab.Examples.PlayFabRegisterUser:OnPlayFabError(PlayFabError) (at Assets/PlayFabClientSDK/Playfab/Examples/Scripts/PlayFabRegisterUser.cs:133)

PlayFab.<RegisterPlayFabUser>c__AnonStorey11:<>m__8(String, String) (at Assets/PlayFabClientSDK/Playfab/PlayFabSDK/Public/PlayFabClientAPI.cs:356)

PlayFab.Internal.<MakeRequest>c__Iterator5:MoveNext() (at Assets/PlayFabClientSDK/Playfab/PlayFabSDK/Internal/PlayFabHTTP.cs:53)"

Need Help :) 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.

1 Answer

·
brendan avatar image
brendan answered

7 Comments
deadstarcgs said on Wed, 18 February 2015 at 3:08 PM

That's the exact problem. Using the base registration you are registering users on the Playfab global database, so like the error says the username isn't available (given that test and admin are very common usernames to begin with).

The only way around this is to either keep trying until you find a username that isn't taken or contact Playfab and ask them for a publisher ID which will allow you to register users under your publisher database rather than the global database.


kotorna said on Wed, 18 February 2015 at 3:21 PM

The only way of getting a publisher ID is by asking them?

That is what I need a publisher ID to have my own user base as I'm planning on using the platform for a product that will be consumer market.


deadstarcgs said on Wed, 18 February 2015 at 3:24 PM

Yes, they don't have a way currently of finding your Publisher ID through the Game Manager as it's only a very new feature. If you contact them at devrel@playfab.com, they'll be able to arrange it for you.


kotorna said on Wed, 18 February 2015 at 3:26 PM

Thanks a lot!,

Once the sent me the ID I need to add the PublisherId: manually as it is not listed anywhere right?


deadstarcgs said on Wed, 18 February 2015 at 3:31 PM

That's correct, the request function will now have a request.PublisherId field that will let you add your Publisher ID and the Playfab servers will handle the rest from there.


voxelus said on Thu, 19 February 2015 at 4:24 AM

Hi deadstarcgs!, thanks for you responses.
I have the publisherId now, and I am trying to replace in every "publisherId" with the code you sent us in the class playFabClientModel (this class is the only one that have the set of the publisherId property, at less, is the only class where I can found it). Can you please tell us where exactly do we have to add this code manually?. I am trying to replace them in all the matches "publisherId", but it does not work,it read from the global database anyway.

Thanks in advance.


Brendan Vanous said on Thu, 19 February 2015 at 11:42 AM

For the sake of those encountering this thread, this was also asked and answered here: https://community.playfab.com/hc/communities/public/questions/206730517-can-t-create-users-with-the-publisherId

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.