question

robertdemjan avatar image
robertdemjan asked

APIClientRequestRateLimitExceeded on Matchmake

Hello!

I have recently encountered an error, where the Matchmake refused to answer to the 4th player.

The exact error message is here:

{
 "code": 400,
 "status": "BadRequest",
 "error": "APIClientRequestRateLimitExceeded",
 "errorCode": 1199,
 "errorMessage": "The client has exceeded the maximum API request rate and is being throttled"
}

I have an own matchmaker, which collects people, and starts a server to them on playfab.

When the matchmaker is finished, it executes a javascript code, which logins every player to playfab with a customId. Select one person, and opens a server with its account. After that, calls the "Matchmake" request for every player, providing the LobbyID, returned by the server creation.

And that's where the problem appears. It works fine for 2 players, but it gets blocked for the 3rd. Now I do understand there could be limits on calling Matchmake, but I don't see any documentation about it, also, I'm calling it on 3 different players. Does it count the limit per IP address instead of per players?

Is there anything wrong with my approach? I don't want to expose the playfab API to my client, I prefer to handle it in my cloud code.

Thank you for the help

Matchmaking
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

If you have your own matchmaker, you shouldn't be using Client/Matchmake. Instead, use the Matchmaker API (https://api.playfab.com/documentation/matchmaker) to authenticate the user on your matchmaker and decide what sessions to put players in, then just pass the info on those sessions back to the clients. Have your custom game servers then query your matchmaker, if you want to validate that the player should legitimately be joining the session in question.

Why is it you don't want the client using the Client API? That's specifically what it's for. And you can turn off all the API calls you don't want them to use via the permissions policies: https://blog.playfab.com/blog/permission-policies

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.