question

lukewaffel avatar image
lukewaffel asked

APINotEnabledForGameClientAcces Unity3D

Hi all,

I've been using PlayFab for one of my school projects, and like always, it's working great. There's one slight problem though. Whenever I try to update leaderboards, the APINotEnabledForGameClientAcces error always pops up. I've enabled all the API's in the editor (Client, Admin, Server and Request times) but that doesn't seem to affect anything.

I was wondering if someone knows how to fix this? I've tried searching online but I couldn't find anything. PlayFab has changed a LOT since I last used it.

Thanks in advance,

~LukeWaffel

apissdksLeaderboards and Statistics
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

·
brendan avatar image
brendan answered

Actually, that's been the same since we launched the service - the Client API call to update stats (as well as updating virtual currencies) has always been turned off by default for all new titles, as they're the easiest ways for players to cheat your game. You can turn them on in the Settings->API Features tab for your title (or by using our permissions system: https://playfab.com/blog/permission-policies/ - that part's newer). I had a look at all the titles I can see for your account, and none of them appear to have those API calls turned on - which Title ID are you using?

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.

lukewaffel avatar image lukewaffel commented ·

@Brendan Ah, that's what I was doing wrong then. I thought it had to be enabled in the Unity project instead of the Title in the PlayFab dashboard.

Now that we're at it though, since it's obviously disabled for security reasons, what would be the best way to save player statistics? I assumed cloud script, but then I when I thought about it for a bit longer, you'd still be sending the client info to the Cloudscript right? Since the client calculates scores, and even if the cloudscript would calculate the scores, changing what will be send to the cloudscript would still manipulate the outcome.

Also, another quick question. Is there any documentation for cloudscript for both Playfab and Photon? The last time I tried using it (Which is about a year ago) I had some trouble with it, but I couldn't find any tutorials on it.

Thanks in advance,

~LukeWaffel

0 Likes 0 ·
brendan avatar image brendan lukewaffel commented ·

For secure update of statistics, you would indeed use either a custom game server or Cloud Script. The best security is to have a dedicated server, so that everything authoritative about the game lives there. But even without that, you can use Cloud Script to check for a range of things, like whether the score is within the bounds of what's valid for your title, whehter enough time has passed since the last time a score was reported for a player to reasonably have completed enough gameplay for a new score to be reported, etc.

And yes, this guide walks you through how to use Photon with PlayFab, including the webhook callbacks into Cloud Script: https://api.playfab.com/docs/tutorials/landing-tournaments/using-photon-with-playfab

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.