> ## 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.

# PFAuthenticationServerLoginWithPSNRequest

> PFAuthenticationServerLoginWithPSNRequest 資料模型。如果這是使用者第一次使用該 PlayStation :tm: Network 帳戶登入，且 CreateAccount 設定為 true，系統將會建立新的 PlayFab 帳戶，並將其連結至該 PlayStation :tm: Network 帳戶。在此情況下，不會有任何電子郵件或使用者名稱與該 PlayFab 帳戶相關聯。否則，如果沒有任何 PlayFab 帳戶連結至該 PlayStation :tm: Network 帳戶，將會傳回指出此情況的錯誤，讓遊戲能引導使用者建立 PlayFab 帳戶。

PFAuthenticationServerLoginWithPSNRequest 資料模型。如果這是使用者第一次使用該 PlayStation :tm: Network 帳戶登入，且 CreateAccount 設定為 true，系統將會建立新的 PlayFab 帳戶，並將其連結至該 PlayStation :tm: Network 帳戶。在此情況下，不會有任何電子郵件或使用者名稱與該 PlayFab 帳戶相關聯。否則，如果沒有任何 PlayFab 帳戶連結至該 PlayStation :tm: Network 帳戶，將會傳回指出此情況的錯誤，讓遊戲能引導使用者建立 PlayFab 帳戶。

## 語法

```cpp theme={null}
typedef struct PFAuthenticationServerLoginWithPSNRequest {  
    const char* authCode;  
    const char* authVersion;  
    bool createAccount;  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFGetPlayerCombinedInfoRequestParams const* infoRequestParameters;  
    int32_t const* issuerId;  
    const char* redirectUri;  
} PFAuthenticationServerLoginWithPSNRequest;  
```

### 成員

**`authCode`**   const char\*<br />*is null-terminated*

由 PlayStation :tm: Network OAuth 提供者提供的驗證碼。

**`authVersion`**   const char\*<br />*is null-terminated*

（選擇性）選擇性的 PlayStation :tm: Network 驗證版本。控制要使用哪個 PlayStation :tm: Network 驗證版本。接受的值為 "v2" 和 "v3"。

**`createAccount`**   bool

如果目前沒有 PlayFab 帳戶連結至此識別碼，則自動建立一個。

**`customTags`**   PFStringDictionaryEntry const\*<br />*may be nullptr*

（選擇性）與要求相關聯的選擇性自訂標籤（例如組建編號、外部追蹤識別碼等）。

**`customTagsCount`**   uint32\_t

customTags 的計數

**`infoRequestParameters`**   PFGetPlayerCombinedInfoRequestParams const\*<br />*may be nullptr*

（選擇性）指定要為使用者傳回哪些資訊的旗標。

**`issuerId`**   int32\_t const\*<br />*may be nullptr*

（選擇性）PlayStation :tm: Network 簽發者環境的識別碼。如果為 null，則預設為生產環境。

**`redirectUri`**   const char\*<br />*is null-terminated*

要求驗證碼時提供給 PlayStation :tm: Network 的重新導向 URI。

## 需求

**標頭：** PFAuthenticationTypes.h

## 另請參閱

[PFAuthenticationTypes 成員](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/pfauthenticationtypes_members)


## Related topics

- [PFAuthenticationServerLoginWithPSNAsync](/zh-TW/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationserverloginwithpsnasync.md)
- [PFAuthenticationServerLoginWithXboxRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithxboxrequest.md)
- [PFAuthenticationLoginWithServerCustomIdRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationloginwithservercustomidrequest.md)
- [PFAuthenticationServerLoginWithBattleNetRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithbattlenetrequest.md)
- [PFAuthenticationServerLoginWithCustomIDRequest](/zh-TW/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationserverloginwithcustomidrequest.md)
