> ## 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 Player Profile

> Retrieves the player's profile

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| PlayerNotInGame | 1033 |




## OpenAPI

````yaml /services/playfab/api-references/rest/server/server.openapi.json post /Server/GetPlayerProfile
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Server API
  description: >-
    Provides functionality to allow external (developer-controlled) servers to
    interact with user inventories and data in a trusted manner, and to handle
    matchmaking and client connection orchestration
  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: Analytics
    description: Analytics APIs
  - name: Authentication
    description: Authentication APIs
  - name: Character Data
    description: Character Data APIs
  - name: Characters
    description: Characters APIs
  - name: Content
    description: Content Service APIs
  - name: Friend List Management
    description: Friend List Management APIs
  - name: Matchmaking
    description: Matchmaking APIs
  - name: Platform Specific Methods
    description: Platform Specific Methods 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: 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
paths:
  /Server/GetPlayerProfile:
    post:
      tags:
        - Account Management
      summary: Get Player Profile
      description: |
        Retrieves the player's profile

        ## Error codes

        This operation may return the following PlayFab errors:

        | Error | Code |
        | --- | --- |
        | PlayerNotInGame | 1033 |
      operationId: GetPlayerProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPlayerProfileRequest'
        description: >-
          This API allows for access to details regarding a user in the PlayFab
          service, usually for purposes of customer support. Note that data
          returned may be Personally Identifying Information (PII), such as
          email address, and so care should be taken in how this data is stored
          and managed. Since this call will always return the relevant
          information for users who have accessed the title, the recommendation
          is to not store this data locally.
      responses:
        '200':
          $ref: '#/components/responses/GetPlayerProfileResult'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - SecretKey: []
components:
  schemas:
    GetPlayerProfileRequest:
      description: >-
        This API allows for access to details regarding a user in the PlayFab
        service, usually for purposes of customer support. Note that data
        returned may be Personally Identifying Information (PII), such as email
        address, and so care should be taken in how this data is stored and
        managed. Since this call will always return the relevant information for
        users who have accessed the title, the recommendation is to not store
        this data locally.
      type: object
      properties:
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        PlayFabId:
          description: >-
            Unique PlayFab assigned ID of the user on whom the operation will be
            performed.
          type: string
        ProfileConstraints:
          allOf:
            - $ref: '#/components/schemas/PlayerProfileViewConstraints'
          description: >-
            If non-null, this determines which properties of the resulting
            player profiles to return. For API calls from the client, only the
            allowed client profile properties for the title may be requested.
            These allowed properties are configured in the Game Manager "Client
            Profile Options" tab in the "Settings" section.
      required:
        - PlayFabId
      example:
        PlayFabId: 621EF20237534A44
    PlayerProfileViewConstraints:
      type: object
      properties:
        ShowAvatarUrl:
          description: Whether to show player's avatar URL. Defaults to false
          type: boolean
        ShowBannedUntil:
          description: Whether to show the banned until time. Defaults to false
          type: boolean
        ShowCampaignAttributions:
          description: Whether to show campaign attributions. Defaults to false
          type: boolean
        ShowContactEmailAddresses:
          description: Whether to show contact email addresses. Defaults to false
          type: boolean
        ShowCreated:
          description: Whether to show the created date. Defaults to false
          type: boolean
        ShowDisplayName:
          description: Whether to show the display name. Defaults to false
          type: boolean
        ShowExperimentVariants:
          description: Whether to show player's experiment variants. Defaults to false
          type: boolean
        ShowLastLogin:
          description: Whether to show the last login time. Defaults to false
          type: boolean
        ShowLinkedAccounts:
          description: Whether to show the linked accounts. Defaults to false
          type: boolean
        ShowLocations:
          description: Whether to show player's locations. Defaults to false
          type: boolean
        ShowMemberships:
          description: Whether to show player's membership information. Defaults to false
          type: boolean
        ShowOrigination:
          description: Whether to show origination. Defaults to false
          type: boolean
        ShowPushNotificationRegistrations:
          description: Whether to show push notification registrations. Defaults to false
          type: boolean
        ShowStatistics:
          description: Reserved for future development
          type: boolean
        ShowTags:
          description: Whether to show tags. Defaults to false
          type: boolean
        ShowTotalValueToDateInUsd:
          description: Whether to show the total value to date in usd. Defaults to false
          type: boolean
        ShowValuesToDate:
          description: Whether to show the values to date. Defaults to false
          type: boolean
      required:
        - ShowDisplayName
        - ShowCreated
        - ShowOrigination
        - ShowLastLogin
        - ShowBannedUntil
        - ShowStatistics
        - ShowCampaignAttributions
        - ShowPushNotificationRegistrations
        - ShowLinkedAccounts
        - ShowContactEmailAddresses
        - ShowTotalValueToDateInUsd
        - ShowValuesToDate
        - ShowTags
        - ShowLocations
        - ShowAvatarUrl
        - ShowMemberships
        - ShowExperimentVariants
    GetPlayerProfileResult:
      type: object
      properties:
        PlayerProfile:
          allOf:
            - $ref: '#/components/schemas/PlayerProfileModel'
          description: >-
            The profile of the player. This profile is not guaranteed to be
            up-to-date. For a new player, this profile will not exist.
      example:
        PlayerProfile:
          TitleId: TitleName
          PlayerId: 621EF20237534A44
          Created: '0001-01-01T00:00:00'
          LastLogin: '0001-01-01T00:00:00'
          BannedUntil: '9999-12-31T23:59:59.9999999'
          DisplayName: PlayerDisplayName
          TotalValueToDateInUSD: 0
    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
    PlayerProfileModel:
      type: object
      properties:
        AdCampaignAttributions:
          description: List of advertising campaigns the player has been attributed to
          type: array
          items:
            $ref: '#/components/schemas/AdCampaignAttributionModel'
          x-isclass: true
        AvatarUrl:
          description: URL of the player's avatar image
          type: string
        BannedUntil:
          description: If the player is currently banned, the UTC Date when the ban expires
          type: string
        ContactEmailAddresses:
          description: List of all contact email info associated with the player account
          type: array
          items:
            $ref: '#/components/schemas/ContactEmailInfoModel'
          x-isclass: true
        Created:
          description: Player record created
          type: string
        DisplayName:
          description: Player display name
          type: string
        ExperimentVariants:
          description: >-
            List of experiment variants for the player. Note that these variants
            are not guaranteed to be up-to-date when returned during login
            because the player profile is updated only after login. Instead, use
            the LoginResult.TreatmentAssignment property during login to get the
            correct variants and variables.
          type: array
          items:
            type: string
        LastLogin:
          description: UTC time when the player most recently logged in to the title
          type: string
        LinkedAccounts:
          description: List of all authentication systems linked to this player account
          type: array
          items:
            $ref: '#/components/schemas/LinkedPlatformAccountModel'
          x-isclass: true
        Locations:
          description: >-
            List of geographic locations from which the player has logged in to
            the title
          type: array
          items:
            $ref: '#/components/schemas/LocationModel'
          x-isclass: true
        Memberships:
          description: List of memberships for the player, along with whether are expired.
          type: array
          items:
            $ref: '#/components/schemas/MembershipModel'
          x-isclass: true
        Origination:
          allOf:
            - $ref: '#/components/schemas/LoginIdentityProvider'
          description: Player account origination
        PlayerId:
          description: PlayFab player account unique identifier
          type: string
        PublisherId:
          description: Publisher this player belongs to
          type: string
        PushNotificationRegistrations:
          description: >-
            List of configured end points registered for sending the player push
            notifications
          type: array
          items:
            $ref: '#/components/schemas/PushNotificationRegistrationModel'
          x-isclass: true
        Statistics:
          description: List of leaderboard statistic values for the player
          type: array
          items:
            $ref: '#/components/schemas/StatisticModel'
          x-isclass: true
        Tags:
          description: List of player's tags for segmentation
          type: array
          items:
            $ref: '#/components/schemas/TagModel'
          x-isclass: true
        TitleId:
          description: Title ID this player profile applies to
          type: string
        TotalValueToDateInUSD:
          description: >-
            Sum of the player's purchases made with real-money currencies,
            converted to US dollars equivalent and represented as a whole number
            of cents (1/100 USD). For example, 999 indicates nine dollars and
            ninety-nine cents.
          type: number
          x-actualtype: uint32
        ValuesToDate:
          description: >-
            List of the player's lifetime purchase totals, summed by real-money
            currency
          type: array
          items:
            $ref: '#/components/schemas/ValueToDateModel'
          x-isclass: true
      example:
        TitleId: FFFF
        PlayerId: 1234ABCD
        Created: '2019-02-11T20:23:05'
        LastLogin: '2020-02-11T20:23:05'
        DisplayName: Gudge
    AdCampaignAttributionModel:
      type: object
      properties:
        AttributedAt:
          description: UTC time stamp of attribution
          type: string
        CampaignId:
          description: Attribution campaign identifier
          type: string
        Platform:
          description: Attribution network name
          type: string
      required:
        - AttributedAt
    ContactEmailInfoModel:
      type: object
      properties:
        EmailAddress:
          description: The email address
          type: string
        Name:
          description: The name of the email info data
          type: string
        VerificationStatus:
          allOf:
            - $ref: '#/components/schemas/EmailVerificationStatus'
          description: The verification status of the email
    LinkedPlatformAccountModel:
      type: object
      properties:
        Email:
          description: Linked account email of the user on the platform, if available
          type: string
        Platform:
          allOf:
            - $ref: '#/components/schemas/LoginIdentityProvider'
          description: Authentication platform
        PlatformUserId:
          description: Unique account identifier of the user on the platform
          type: string
        Username:
          description: Linked account username of the user on the platform, if available
          type: string
    LocationModel:
      type: object
      properties:
        City:
          description: City name.
          type: string
        ContinentCode:
          allOf:
            - $ref: '#/components/schemas/ContinentCode'
          description: The two-character continent code for this location
        CountryCode:
          allOf:
            - $ref: '#/components/schemas/CountryCode'
          description: >-
            The two-character ISO 3166-1 country code for the country associated
            with the location
        Latitude:
          description: Latitude coordinate of the geographic location.
          type: number
          x-actualtype: double
        Longitude:
          description: Longitude coordinate of the geographic location.
          type: number
          x-actualtype: double
    MembershipModel:
      type: object
      properties:
        IsActive:
          description: >-
            Whether this membership is active. That is, whether the
            MembershipExpiration time has been reached.
          type: boolean
        MembershipExpiration:
          description: The time this membership expires
          type: string
        MembershipId:
          description: The id of the membership
          type: string
        OverrideExpiration:
          description: >-
            Membership expirations can be explicitly overridden (via game
            manager or the admin api). If this membership has been overridden,
            this will be the new expiration time.
          type: string
        OverrideIsSet:
          description: Whether the override expiration is set.
          type: boolean
          x-GovernsProperty: OverrideExpiration
        Subscriptions:
          description: The list of subscriptions that this player has for this membership
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionModel'
          x-isclass: true
      required:
        - MembershipExpiration
        - IsActive
    LoginIdentityProvider:
      type: string
      enum:
        - Unknown
        - PlayFab
        - Custom
        - GameCenter
        - GooglePlay
        - Steam
        - XBoxLive
        - PSN
        - Kongregate
        - Facebook
        - IOSDevice
        - AndroidDevice
        - Twitch
        - WindowsHello
        - GameServer
        - CustomServer
        - NintendoSwitch
        - FacebookInstantGames
        - OpenIdConnect
        - Apple
        - NintendoSwitchAccount
        - GooglePlayGames
        - XboxMobileStore
        - King
        - BattleNet
    PushNotificationRegistrationModel:
      type: object
      properties:
        NotificationEndpointARN:
          description: Notification configured endpoint
          type: string
        Platform:
          allOf:
            - $ref: '#/components/schemas/PushNotificationPlatform'
          description: Push notification platform
    StatisticModel:
      type: object
      properties:
        Name:
          description: Statistic name
          type: string
        Value:
          description: Statistic value
          type: number
          x-actualtype: int32
        Version:
          description: Statistic version (0 if not a versioned statistic)
          type: number
          x-actualtype: int32
      required:
        - Version
        - Value
    TagModel:
      type: object
      properties:
        TagValue:
          description: Full value of the tag, including namespace
          type: string
    ValueToDateModel:
      type: object
      properties:
        Currency:
          description: ISO 4217 code of the currency used in the purchases
          type: string
        TotalValue:
          description: >-
            Total value of the purchases in a whole number of 1/100 monetary
            units. For example, 999 indicates nine dollars and ninety-nine cents
            when Currency is 'USD')
          type: number
          x-actualtype: uint32
        TotalValueAsDecimal:
          description: >-
            Total value of the purchases in a string representation of decimal
            monetary units. For example, '9.99' indicates nine dollars and
            ninety-nine cents when Currency is 'USD'.
          type: string
      required:
        - TotalValue
    EmailVerificationStatus:
      type: string
      enum:
        - Unverified
        - Pending
        - Confirmed
    ContinentCode:
      type: string
      enum:
        - AF
        - AN
        - AS
        - EU
        - NA
        - OC
        - SA
        - Unknown
    CountryCode:
      type: string
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - CV
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CW
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MK
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SZ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - US
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - Unknown
    SubscriptionModel:
      type: object
      properties:
        Expiration:
          description: When this subscription expires.
          type: string
        InitialSubscriptionTime:
          description: The time the subscription was orignially purchased
          type: string
        IsActive:
          description: >-
            Whether this subscription is currently active. That is, if
            Expiration > now.
          type: boolean
        Status:
          allOf:
            - $ref: '#/components/schemas/SubscriptionProviderStatus'
          description: >-
            The status of this subscription, according to the subscription
            provider.
        SubscriptionId:
          description: The id for this subscription
          type: string
        SubscriptionItemId:
          description: The item id for this subscription from the primary catalog
          type: string
        SubscriptionProvider:
          description: >-
            The provider for this subscription. Apple or Google Play are
            supported today.
          type: string
      required:
        - Expiration
        - IsActive
        - InitialSubscriptionTime
    PushNotificationPlatform:
      type: string
      enum:
        - ApplePushNotificationService
        - GoogleCloudMessaging
    SubscriptionProviderStatus:
      type: string
      enum:
        - NoError
        - Cancelled
        - UnknownError
        - BillingError
        - ProductUnavailable
        - CustomerDidNotAcceptPriceChange
        - FreeTrial
        - PaymentPending
  responses:
    GetPlayerProfileResult:
      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/GetPlayerProfileResult'
            example:
              code: 200
              status: OK
              data:
                PlayerProfile:
                  TitleId: TitleName
                  PlayerId: 621EF20237534A44
                  Created: '0001-01-01T00:00:00'
                  LastLogin: '0001-01-01T00:00:00'
                  BannedUntil: '9999-12-31T23:59:59.9999999'
                  DisplayName: PlayerDisplayName
                  TotalValueToDateInUSD: 0
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  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 Player Profile](/services/playfab/api-references/rest/client/account-management/get-player-profile.md)
- [Tutorial Get a player profile](/services/playfab/player-progression/player-data/getting-player-profiles.md)
- [PFAccountManagementGetPlayerProfileResult](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementgetplayerprofileresult.md)
- [PFAccountManagementClientGetPlayerProfileGetResult](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientgetplayerprofilegetresult.md)
- [PFAccountManagementServerGetPlayerProfileGetResult](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementservergetplayerprofilegetresult.md)
