question

Reason Random avatar image
Reason Random asked

Problem With Registartion??,

registration issue this is my code:

PlayFabLogin.cs

    private string userEmail;
    private string userPassword;
    private string userName;
    public GameObject registrationpanel;

    public void Start()
    {
        if (string.IsNullOrEmpty(PlayFabSettings.TitleId))
        {
            PlayFabSettings.TitleId = "00012";   //here my title id                     
        }

         var request = new LoginWithEmailAddressRequest { Email = userEmail, Password =              userPassword};
        PlayFabClientAPI.LoginWithEmailAddress(request, OnLoginSuccess, OnLoginFailure);
    }


    private void OnLoginSuccess(LoginResult result)
    {
        Debug.Log("Congratulations, you made your first successful API call!");                                                 
        registrationpanel.SetActive(false);
    }
    
    private void OnRegisterSuccess(RegisterPlayFabUserResult result)
    {
        Debug.Log("Congratulations, you made your first successful API call!");
        registrationpanel.SetActive(false);
    }

    private void OnLoginFailure(PlayFabError error)
    {
        Debug.LogWarning("Something went wrong with your first API call.  :(");
        Debug.LogError("Here's some debug information:");
        Debug.LogError(error.GenerateErrorReport());


        var registerRequest = new RegisterPlayFabUserRequest { Email = userEmail, Password = userPassword, Username = userName };  
        PlayFabClientAPI.RegisterPlayFabUser(registerRequest, OnRegisterSuccess, onRegisterFailure);


        Debug.Log(error.GenerateErrorReport());
    }

    private void onRegisterFailure(PlayFabError error)
    {
        Debug.LogError(error.GenerateErrorReport());
    }


    public void GetUserEmail(string emailIn)         //get the emailaddress
    {
        userEmail = emailIn;
    }


    public void GetUserPassword(string passwordIn)     //get the password
    {
        userPassword = passwordIn;
    }


    public void GetUsername(string userNameIn)     //get the username
    {
        userNameIn = userName;
    }

    public void OnClickRegistration()
    {
        var registerRequest = new RegisterPlayFabUserRequest { Email = userEmail, Password = userPassword, Username = userName };  

        PlayFabClientAPI.RegisterPlayFabUser(registerRequest, OnRegisterSuccess, onRegisterFailure);


        
    }



 


on click call 

username -> PlayFabLogin->GetUsername
email ->  PlayFabLogin -> GetUserEmail

password -> PlayFabLogin -> GetUserPassword

registration -> PlayFabLogin -> OnClickRegistration


how to solve this issue

,

Player DataPush Notifications
username.png (102.1 KiB)
registration.png (107.7 KiB)
1 comment
10 |1200

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

Reason Random avatar image Reason Random commented ·

@admin-12 Last 15 minute you put my post in awaiting moderation??can u give reason??

0 Likes 0 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Hi, to avoid spam posts, new accounts usually need to wait for approval for their several initial posts, that’s the reason why your post is in awaiting moderation list. Now, concerning your question, I don’t see any logs about this registration issue you are facing, can you provide us some error info such as error messages so we can investigate, thanks.

6 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.

Reason Random avatar image Reason Random commented ·

playfab login and password, same login and password enter run time but unity says invalid input parameters

0 Likes 0 ·
error.png (31.5 KiB)
Citrus Yan avatar image Citrus Yan Reason Random commented ·

Hi, it seems that for some reason your parameters are not passed in RegisterPlayFabUserRequest successfully, please make sure that the values you typed in the InputFields get passed to the variables you defined for RegisterPlayFabUserRequest. You can set up a breakpoint at line 69 to see whether the parameters passed is legitimate. Anyway, for instance, the parameters should be like this:

"Username": "test01",


"Email": "test01@playfab.com",


"Password": "123456",


"RequireBothUsernameAndEmail": true,


"TitleId":"your title id"

You can refer to this API documentation for more information. By the way, it's convenient to use http traffic capture tool (for instance, like Postman) for troubleshooting, here is the guide you may find interesting:)

1 Like 1 ·
Reason Random avatar image Reason Random Citrus Yan commented ·


@Citrus Yan thanks for support , still i m facing this issue unity give an

error: /Client/RegisterPlayFabUser: The client has exceeded the maximum API request rate and is being throttled

/Client/RegisterPlayFabUser: Invalid input parameters : One of the following properties must be defined: Password,

0 Likes 0 ·
Show more comments

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.