> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Publisher Data

> Retrieves the publisher-specific custom data for the user which is readable and writable by the client



## OpenAPI

````yaml post /Admin/GetUserPublisherData
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Admin API
  description: >-
    APIs for managing title configurations, uploaded Game Server code
    executables, and user data
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: Account Management
    description: Account Management APIs
  - name: Authentication
    description: Authentication APIs
  - name: Characters
    description: Characters APIs
  - name: Content
    description: Content Service APIs
  - name: Custom Server Management
    description: Custom Server Management APIs
  - name: Matchmaking
    description: Matchmaking APIs
  - name: Player Data Management
    description: Player Data Management APIs
  - name: Player Item Management
    description: Player Item Management APIs
  - name: PlayStream
    description: PlayStream Management APIs
  - name: ScheduledTask
    description: Task management APIs
  - name: Segments
    description: Segment management APIs
  - name: Server-Side Cloud Script
    description: Server-Side Cloud Script APIs
  - name: Shared Group Data
    description: Shared Group Data APIs
  - name: Title-Wide Data Management
    description: Title-Wide Data Management APIs
  - name: Xbox Store
    description: Xbox Store APIs
paths:
  /Admin/GetUserPublisherData:
    post:
      tags:
        - Player Data Management
      summary: Get User Publisher Data
      description: >-
        Retrieves the publisher-specific custom data for the user which is
        readable and writable by the client
      operationId: GetUserPublisherData
      requestBody:
        $ref: '#/components/requestBodies/GetUserDataRequest'
      responses:
        '200':
          $ref: '#/components/responses/GetUserDataResult'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - SecretKey: []
components:
  requestBodies:
    GetUserDataRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetUserDataRequest'
      description: >-
        Data is stored as JSON key-value pairs. If the Keys parameter is
        provided, the data object returned will only contain the data specific
        to the indicated Keys. Otherwise, the full set of custom user data will
        be returned.
  responses:
    GetUserDataResult:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/GetUserDataResult'
            example:
              code: 200
              status: OK
              data:
                PlayFabId: '2039475'
                DataVersion: 12
                Data:
                  preferences:
                    Value: alpha
                    LastUpdated: '2014-08-20T12:30:45'
                    Permission: Public
                  progress:
                    Value: level_twenty
                    LastUpdated: '2014-09-01T10:12:30'
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  schemas:
    GetUserDataRequest:
      description: >-
        Data is stored as JSON key-value pairs. If the Keys parameter is
        provided, the data object returned will only contain the data specific
        to the indicated Keys. Otherwise, the full set of custom user data will
        be returned.
      type: object
      properties:
        IfChangedFromDataVersion:
          description: >-
            The version that currently exists according to the caller. The call
            will return the data for all of the keys if the version in the
            system is greater than this.
          type: number
          x-actualtype: uint32
        Keys:
          description: Specific keys to search for in the custom user data.
          type: array
          items:
            type: string
        PlayFabId:
          description: >-
            Unique PlayFab assigned ID of the user on whom the operation will be
            performed.
          type: string
      required:
        - PlayFabId
      example:
        PlayFabId: '2039475'
        Keys:
          - preferences
          - progress
        IfChangedFromDataVersion: 13
    GetUserDataResult:
      type: object
      properties:
        Data:
          allOf:
            - $ref: '#/components/schemas/UserDataRecord'
          description: User specific data for this title.
        DataVersion:
          description: >-
            Indicates the current version of the data that has been set. This is
            incremented with every set call for that type of data (read-only,
            internal, etc). This version can be provided in Get calls to find
            updated data.
          type: number
          x-actualtype: uint32
        PlayFabId:
          description: >-
            PlayFab unique identifier of the user whose custom data is being
            returned.
          type: string
      required:
        - DataVersion
      example:
        PlayFabId: '2039475'
        DataVersion: 12
        Data:
          preferences:
            Value: alpha
            LastUpdated: '2014-08-20T12:30:45'
            Permission: Public
          progress:
            Value: level_twenty
            LastUpdated: '2014-09-01T10:12:30'
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
    UserDataRecord:
      type: object
      properties:
        LastUpdated:
          description: Timestamp for when this data was last updated.
          type: string
        Permission:
          allOf:
            - $ref: '#/components/schemas/UserDataPermission'
          description: >-
            Indicates whether this data can be read by all users (public) or
            only the user (private). This is used for GetUserData requests being
            made by one player about another player.
        Value:
          description: Data stored for the specified user data key.
          type: string
      required:
        - LastUpdated
      example:
        Value: my value
        LastUpdated: '2015-05-15T03:01:09'
        Permission: Public
    UserDataPermission:
      description: >-
        Indicates whether a given data key is private (readable only by the
        player) or public (readable by all players). When a player makes a
        GetUserData request about another player, only keys marked Public will
        be returned.
      type: string
      enum:
        - Private
        - Public
  securitySchemes:
    SecretKey:
      type: apiKey
      in: header
      name: X-SecretKey
      description: >-
        This API requires a title secret key, available to title admins, from
        PlayFab Game Manager.

````

## Related topics

- [Get User Publisher Data](/api-reference/player-data-management/get-user-publisher-data.md)
- [Using publisher data](/services/playfab/live-service-management/game-configuration/titledata/using-publisher-data.md)
- [PFPlayerDataManagementServerGetUserPublisherDataAsync](/services/playfab/api-references/c/pfplayerdatamanagement/functions/pfplayerdatamanagementservergetuserpublisherdataasync.md)
- [PFPlayerDataManagementServerGetUserPublisherInternalDataAsync](/services/playfab/api-references/c/pfplayerdatamanagement/functions/pfplayerdatamanagementservergetuserpublisherinternaldataasync.md)
- [PFPlayerDataManagementClientGetUserPublisherDataAsync](/services/playfab/api-references/c/pfplayerdatamanagement/functions/pfplayerdatamanagementclientgetuserpublisherdataasync.md)
