question

dave-4 avatar image
dave-4 asked

How to disable client-side PlayStream WritePlayerEvent API?

We'd like to be able to disable PlayStream events from the client, and only write them from the server. Is this possible?

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

·
Made Wang avatar image
Made Wang answered

You can refer to API Access Policy - PlayFab | Microsoft Docs to call UpdatePolicy to customize the API policy. And refer to the code below to disable the client WritePlayerEvent, I tested it via Postman.

{
  "PolicyName": "ApiPolicy",
  "Statements": [
    {
      "Resource": "pfrn:api--/Client/WritePlayerEvent",
      "Action": "*",
      "Effect": "Deny",
      "Principal": "*",
      "Comment": "Deny client WritePlayerEvent call"
    }
  ],
  "OverwritePolicy": false,
  "PolicyVersion": 6
}
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.