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

# ServerSendPushNotificationFromTemplateAsync

> Reference for PFPushNotificationsServerSendPushNotificationFromTemplateAsync, a PlayFab C API function that sends a push notification template to a user.

Sends an iOS/Android Push Notification template to a specific user, if that user's device has been configured for Push Notifications in PlayFab. If a user has linked both Android and iOS devices, both will be notified.

## Syntax

```cpp theme={null}
HRESULT PFPushNotificationsServerSendPushNotificationFromTemplateAsync(  
    PFEntityHandle titleEntityHandle,  
    const PFPushNotificationsSendPushNotificationFromTemplateRequest* request,  
    XAsyncBlock* async  
)  
```

### Parameters

**`titleEntityHandle`**   PFEntityHandle

PFEntityHandle for a title Entity obtained using PFAuthenticationGetEntityWithSecretKeyAsync.

**`request`**   [PFPushNotificationsSendPushNotificationFromTemplateRequest\*](/services/playfab/api-references/c/pfpushnotificationstypes/structs/pfpushnotificationssendpushnotificationfromtemplaterequest)

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 Windows, Linux, and macOS. Call XAsyncGetStatus to get the status of the operation. If the service call is unsuccessful, the async result will be E\_PF\_PUSH\_NOT\_ENABLED\_FOR\_ACCOUNT, E\_PF\_PUSH\_NOTIFICATION\_TEMPLATE\_NOT\_FOUND, E\_PF\_PUSH\_SERVICE\_ERROR or any of the global PlayFab Service errors. See doc page "Handling PlayFab Errors" for more details on error handling.

## Requirements

**Header:** PFPushNotifications.h

## See also

[PFPushNotifications members](/services/playfab/api-references/c/pfpushnotifications/pfpushnotifications_members)


## Related topics

- [PFPushNotificationsSendPushNotificationFromTemplateRequest](/services/playfab/api-references/c/pfpushnotificationstypes/structs/pfpushnotificationssendpushnotificationfromtemplaterequest.md)
- [PFPushNotificationsServerSendPushNotificationAsync](/services/playfab/api-references/c/pfpushnotifications/functions/pfpushnotificationsserversendpushnotificationasync.md)
- [PFAccountManagementServerSendEmailFromTemplateAsync](/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementserversendemailfromtemplateasync.md)
- [Services C API overview - PFPushNotifications.h](/services/playfab/api-references/c/pfpushnotifications/pfpushnotifications_members.md)
- [Push notification templates](/services/playfab/live-service-management/game-configuration/title-communications/push-notifications/push-notification-templates.md)
