Skip to main content
This tutorial describes how to create and use namespace-scoped data through the Publisher data APIs. Publisher data is static data that spans more than one title in a PlayFab namespace, such as when multiple games need to share common information. Publisher is the older API term for the namespace scope, and the Publisher ID identifies the namespace. A namespace is distinct from a studio, which is the administrative grouping for titles, users, permissions, and billing. For more information, see PlayFab concepts.
This category also includes data for players that spans multiple games. PlayFab stores data as Key/Value Pairs (KVPs).
Most of these APIs are server APIs that your program must call from a dedicated server, or through a CloudScript function within the PlayFab service. You must call the server APIs from a dedicated server or through a CloudScript function through the PlayFab service. This is by design, as the PlayFab server APIs require that you supply your secret key.
We do not recommend using server APIs from within a game client. If you need to make use of a server API, use CloudScript for this type of functionality.
Publisher data values are copied and distributed to potentially hundreds of machines in the PlayFab cluster server. As part of this process, this data is cached and changes may take up to fifteen minutes to refresh in those caches.
Publisher data is best suited for global constant/static data and isn’t suitable or reliable as global variables.

Publisher data

Publisher data is used to store static data for the titles in a namespace. Each entry isn’t bound to a player entity (as opposed to user publisher data).

Setting Publisher data

The following snippet demonstrates how to set Publisher data using the Server API.
There is an admin API counterpart for this operation.

Getting Publisher data

The following snippet demonstrates getting Publisher data using the Client API.
There are server and admin API counterparts for this operation.

User Publisher data

User Publisher data can be used to introduce Publisher data that is bound to a PlayFab user (player). Unlike regular Publisher data, it is possible for a Client application to alter user Publisher data. PlayFab exposes 3 protection levels for user Publisher data from the Client API point of view:
  1. Regular user Publisher data exposes read and write access for client applications.
    • Set via Client, Server, and Admin API.
    • Get via Client, Server, and Admin API.
    • The Client API may only set Publisher data for a player who is currently logged in.
  2. Read-only user Publisher data exposes read access for client applications.
    • Set via Server and Admin API.
    • Get via Client, Server, and Admin API.
  3. Internal user Publisher data exposes no access for client applications, and is used to store the secret portion of user data.
    • Set via Server and Admin API.
    • Get via Server and Admin API.

Setting user Publisher data

The following snippet demonstrates how to set all 3 kinds of Publisher data using Client and Server APIs.

Getting user Publisher data

The following snippet demonstrates how to get all 3 kinds of Publisher data using Client and Server APIs.

See also

Last modified on September 1, 2026