question

narendrag avatar image
narendrag asked

How to call client API from cloudscript

apis
10 |1200

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

brendan avatar image
brendan answered

Currently, you wouldn't, as the Client API calls are meant to be made from the Client. However, we'll be updating the Server API in the near future to incorporate many of the Client API methods into it (of the ones not already there). What is your specific scenario, though? What Client API are you trying to call?

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.

narendrag avatar image narendrag commented ·

Hello Brendan,

I want to update user names by using the cloudscript because I want to check user names for some pattern.

For that I want to call UpdateUserTitleDisplayName API through cloudscript.

1 Like 1 ·
pdaz avatar image pdaz narendrag commented ·

I made this checking on client-side. I think this is the best solution. If you concern about hacking you would never protect of it because hacker can just directly call ClientAPI/UpdateUserTitleDisplayName

0 Likes 0 ·
brendan avatar image brendan pdaz commented ·

A fair point, though I will add that the other half of the change above is that we'll be providing you with a way to disable any Client API call for your title, so once that change has been made this will be a viable solution.

1 Like 1 ·
brett avatar image brett commented ·

"we'll be updating the Server API in the near future"

2 years later, I need this feature as well. A previous version of the project used PlayerData to store a 'Nickname'. Upon login, I'm checking if that key exists, and if so, deleting it, and wanting to call UpdateUserTitleDisplayName from cloud script.

A shame we're forcing the client to perform server side functionality. I guess it isn't my bandwidth bill...

0 Likes 0 ·
brendan avatar image brendan brett commented ·

We actually did add more functionality to the Server API, to make it available in Cloud Script. The UpdateUserTitleDisplayName API call has not, but that's simply because we've had only a few requests for that. I'd recommend adding a post asking for it in the Feature Requests forum. The "likes" on ideas there help us with prioritization, since it allows an easy way for developers to indicate which features would be most useful to them.

0 Likes 0 ·
Nazariy Tymkiv avatar image Nazariy Tymkiv brendan commented ·

We waiting for 6 years now to get able to change nickname from cloudscript. We dont need to change different user nickname, we need to change current user display name, i can't belive that it is realy hard to implement

0 Likes 0 ·
company avatar image
company answered

Would be good to have LinkGameCenterAccount and other Link commands available to repair user account related problems on the Playfab site. Are they going to be available? For now i cannot repair these accounts. (I wanted to use it through Run Cloudscript on the player`s playfab page)

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

brendan avatar image brendan commented ·

Only account types that are set up with a simple ID (like device ID or custom ID) can be set up via the Game Manager currently. Any account type which requires a token will only be set up correctly via a valid token, since they need to exchange data with the service that owns the account being referenced. At the moment, we'd recommend using the Client API calls in a simple tool, like Postman, for cases where you want to re-link a token-based account.

0 Likes 0 ·
company avatar image company brendan commented ·

Thanks for the info, i could solve the issue through Postman!

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.