question

pedretegarrido avatar image
pedretegarrido asked

Contact email example shows me an error

I want to create an account with a contact email, but with the coda example in the playfab website give me an error at the "AddOrUpdateContactEmail" with the var "PlayFabId", it sais that there are no definition for that function, and I can't add the contact email when an account is created.

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

·
Made Wang avatar image
Made Wang answered

Referring to Account Management - Add Or Update Contact Email - REST API (PlayFab Client) | Microsoft Docs, AddOrUpdateContactEmail doesn't need PlayFabId, you can refer to the code below.

PlayFabClientAPI.RegisterPlayFabUser(new RegisterPlayFabUserRequest
{
    Email = "",
    Username="",
    Password = ""
},
(result) =>
{
    PlayFabClientAPI.AddOrUpdateContactEmail(new AddOrUpdateContactEmailRequest
    {
        EmailAddress = ""
    },
    (result) =>
    {
        Debug.Log("Update Success");
    },
    (error) =>
    {
        Debug.LogError(error.GenerateErrorReport());
    });
},
(error) =>
{
    Debug.LogError(error.GenerateErrorReport());
});
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.