question

Alejandro avatar image
Alejandro asked

How to add custom fields when registering user via Playfab Rest API?

I'm registering users via my web-client, but I want to be able to add custom fields when sending request to register user to Playfab API, i.e. "user", "admin" etc.

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

·
Citrus Yan avatar image
Citrus Yan answered

May I know what are these custom fields used for? Are they provided by the players themselves ( they can write/read such data) or are only writable by the server-side?

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

Alejandro avatar image Alejandro commented ·

These fields are used by an admin who registers users in bulk (assigning users as admin, teacher, student etc.). These fields are to be used in-game later on for defining permissions to certain areas/actions.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Alejandro commented ·

In that case you can use UpdateUserReadOnlyData or UpdateUserInternalData to store those fields into Player ReadOnly Data (players can only read it from the client side) or Internal Data (players cannot access it from the client side).

1 Like 1 ·
Alejandro avatar image Alejandro Citrus Yan commented ·

Thanks, this should help

0 Likes 0 ·

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.