question

Francois Boucher-Genesse avatar image
Francois Boucher-Genesse asked

Modifying contact email with cloudscript

Hello,

Is there any way we can change the contact email of a player in cloudscripts? I don't see ways to modify the player profile through the server API, and found no equivalent to the client AddOrUpdateContactEmail method.

The reason we need this: in our game players need to register with an email account. We first create their account with PlayFabClientAPI.AddUsernamePassword, and would like the server to copy that same email address as the contact email. We will then send an email to users that just created their account. The workaround we're using at this point is to have the client call AddOrUpdateContactEmail after creation of their account, which is somewhat riskier. Ideally we would keep this logic on the server and not have to handle clients that didn't successfully update their contact email for whatever reason.

Thank you!

10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

[Edited] PlayFab doesn’t provide a server API function to add the contact email for a user. So you cannot use client API AddOrUpdateContactEmail in the Cloud Script.

Due to Client API has a low rate limit. The limit applies to the call rate from the same IP address. We do not suggest calling Client API on the server-side.

If this feature is necessary for you, you can try to add a feature request to suggest adding a server API that can be used to update the players’ contact emails.

10 |1200

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

Francois Boucher-Genesse avatar image
Francois Boucher-Genesse answered

Hi Sarah,

Interesting, I didn't know we could use CloudScript Azure Functions to access client API, we might use this down the road.

Thanks for confirming this isn't supported out of the box, I created the feature request.

Thanks again!

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.