question

hipposoft3 avatar image
hipposoft3 asked

How to limit the user to call too much API call. What happend then?

Hi, I have some question!

I have seen that there are many limitation in the "TitleSettings - Limits" section, for example, a player data value can be updated 10 times per 15 seconds.

So,

1) How can I prevent the players to calling too much client API more than the limit.

2) What would happen or How can I know the player exceed the API call limitation? The PlayfabError callback would be called with some error message?

Thanks.

apislimits
10 |1200

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

drallcom3 avatar image
drallcom3 answered

You can't prevent the player from doing so. They could just send packages manually ("hack"). You can of course design your game so that it doesn't send that many requests (and you really should).

Look at the Playfab error codes. One of them is about what you said.

10 |1200

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

Rick Chen avatar image
Rick Chen answered

If the player update their data too frequently and hit the limit, they could receive limit exceeded error when they update the data again.

In your client side you can add a break time to the button that calls the update API. For example, disable the button for 5 seconds after the player press it.

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.