question

Ivan Kozka avatar image
Ivan Kozka asked

From my Rest API to PlayFab API

Hello!

I'm creating a multiplayer game and I want to host it on PlayFab. But my requests to PlayFab will go through my rest api and from my rest api already to Playlab, that is, my Rest API will be like a proxy server. Is such an implementation possible? and are there any restrictions in this regard?

Thank you in advance!

apisCustom Game Serversmultiplayer
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

·
Sarah Zhang avatar image
Sarah Zhang answered

We only recommend you host the requests of PlayFab Server API and PlayFab Title-level Entity API on your web server. For clarification, we designed the different APIs for the features that have different access levels. Among them, the Client API is designed to be called by the client directly and has the a low rate limit that enforced by IP addresses. There is no need to call them on the external server. The Server API is designed to do the server-side logic, and isn’t allowed by accessed by clients directly. You can consider calling the PlayFab Server API on your web server, and provide the custom REST API for players to call them.

If you want to host the requests of the PlayFab Client API on the custom servers, could you please clarify why you need to do this?

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.

Ivan Kozka avatar image Ivan Kozka commented ·

could you please clarify why you need to do this?

In order not to be dependent, for cross-platform, since I do not use the full functionality of Play Fab, but only part of it

that is, you want to say if I call this request https://7DCFA.playfabapi.com/Match/CreateMatchmakingTicket or this https://7DCFA.playfabapi.com/Match/GetMatchmakingTicket from my Web API, it will not work, do I understand correctly?

And what do you mean by the name client API and server API?

Thnak you!

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Ivan Kozka commented ·

For clarification, our APIs already can be used on cross platforms. If you want to publish a part of APIs for players only, you would need to follow this documentation - API Access Policy - PlayFab | Microsoft Docs block read and write accesses of some APIs.

For more information about the types of APIs, you can check the API reference - PlayFab Admin REST API | Microsoft Docs for more information. The APIs that under the Client API are client APIs. They need to be accessed through authenticating Session Tickets which is the credential designed for players. The APIs that under the Server API are server APIs. They need to be accessed through authenticating Developer Secret Key which is the credential designed for servers or administrative tools.

The Entity API CreateMatchmakingTicket can work on your external servers. But since it is designed for clients, so we suggest you don't call it on server-sides to prevent exceed the limits. If you want to create matchmaking ticket for players on server-side, you can consider calling the title-level Entity API CreateServerMatchmakingTicket. Besides, the Entity API GetMatchmakingTicket can be called on server-side.

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.