We have an application where some of our external services need to update some data on player accounts. And to achieve this we are using ServerAPI. An to user server API, we have created multiple secrets for each of our internal service that needs access to our PlayFab Title, so that they can login with a ServerCustomID, and once they login they can call our CloudScripts that take data from these services and update the layer/USerData. (Server/UpdateUserInternalData)
1) The challenge or confusion I now have is that this external services needs to know the PlayerID of the user it needs to UpdateUserInternalData. This API https://docs.microsoft.com/en-us/rest/api/playfab/server/player-data-management/updateuserinternaldata?view=playfab-rest
This API requires: and is not clear if this PlayFabId is masterID or TitleId.
PlayFabId | True |
|
Unique PlayFab assigned ID of the user on whom the operation will be performed. |
When tries from Postman, I was only able to updateUSerInternalData, when I pass in MasterPlayFabId and not TitlePlayFabId. Does this mean, our external services need to keep track of both Master and Title PlayerId of all the platers in the system?
2) I understand the how Master and Title ID work, but for a external Service logged into a Title Using: /Server/LoginWithServerCustomId, why cant we just use TitleID? Also is there a way to retrieve the MasterID from TitleID as part of ServerAPI?
3) What is the right scenario for using MasterId vs TitleId? Why does the API documentation not make it clear that it is supposed to be a MasterId and not a TitleId on the (Server/UpdateUserInternalData)..
4) Finally, if my external service has to update or set a flag on 10k userId's (MasterId), is this the right way to do it? by having the Service login with ServerCustomID, and perform CloudScripts, if not what is a better way to do it?