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

# PFAccountManagementClientLinkPSNAccountAsync

> Client API to link a PlayStation Network account (using a provided access code) to the authenticated player's PlayFab account for cross-session sign-in.

Links the PlayStation :tm: Network account associated with the provided access code to the user's PlayFab account

## Syntax

```cpp theme={null}
HRESULT PFAccountManagementClientLinkPSNAccountAsync(  
    PFEntityHandle entityHandle,  
    const PFAccountManagementClientLinkPSNAccountRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle to use for authentication.

**`request`**   [PFAccountManagementClientLinkPSNAccountRequest\*](/services/playfab/api-references/c/pfaccountmanagementtypes/structs/pfaccountmanagementclientlinkpsnaccountrequest)

Populated request object.

**`async`**   XAsyncBlock\*<br />*Inout*

XAsyncBlock for the async operation.

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This API is available on Win32, Sony PlayStation®, Linux, and macOS. See also ClientLoginWithPSNAsync, ClientUnlinkPSNAccountAsync. Call XAsyncGetStatus to get the status of the operation. If the service call is unsuccessful, the async result will be E\_PF\_ACCOUNT\_ALREADY\_LINKED, E\_PF\_INVALID\_PSN\_AUTH\_CODE, E\_PF\_INVALID\_PSN\_AUTH\_CODE, E\_PF\_INVALID\_PSN\_ISSUER\_ID, E\_PF\_LINKED\_ACCOUNT\_ALREADY\_CLAIMED, E\_PF\_PSN\_INACCESSIBLE or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Requirements

**Header:** PFAccountManagement.h

## See also

[PFAccountManagement members](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members)


## Related topics

- [Services C API overview - PFAccountManagement.h](/services/playfab/api-references/c/pfaccountmanagement/pfaccountmanagement_members.md)
- [PFAccountManagementClientLinkXboxAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinkxboxaccountasync.md)
- [PFAccountManagementClientLinkGoogleAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinkgoogleaccountasync.md)
- [PFAccountManagementClientLinkFacebookAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinkfacebookaccountasync.md)
- [PFAccountManagementClientLinkSteamAccountAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinksteamaccountasync.md)
