Account Management - Send Push Notification
Sends an iOS/Android Push Notification 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.
POST https://titleId.playfabapi.com/Server/SendPushNotification
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-SecretKey | True |
string |
This API requires a title secret key, available to title admins, from PlayFab Game Manager. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
Recipient | True |
string |
PlayFabId of the recipient of the push notification. |
AdvancedPlatformDelivery |
Allows you to provide precisely formatted json to target devices. This is an advanced feature, allowing you to deliver to custom plugin logic, fields, or functionality not natively supported by PlayFab. |
||
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
|
Message |
string |
Text of message to send. |
|
Package |
Defines all possible push attributes like message, title, icon, etc. Some parameters are device specific - please see the PushNotificationPackage documentation for details. |
||
Subject |
string |
Subject of message to send (may not be displayed in all platforms) |
|
TargetPlatforms |
Target Platforms that should receive the Message or Package. If omitted, we will send to all available platforms. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-SecretKey
This API requires a title secret key, available to title admins, from PlayFab Game Manager.
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
Advanced |
|
Api |
The basic wrapper around every failed API response |
Push |
|
Push |
|
Send |
|
Send |
AdvancedPushPlatformMsg
Name | Type | Description |
---|---|---|
GCMDataOnly |
boolean |
Stops GoogleCloudMessaging notifications from including both notification and data properties and instead only sends the data property. |
Json |
string |
The Json the platform should receive. |
Platform |
The platform that should receive the Json. |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
integer |
Numerical HTTP code |
error |
string |
Playfab error code |
errorCode |
integer |
Numerical PlayFab error code |
errorDetails |
object |
Detailed description of individual issues with the request object |
errorMessage |
string |
Description for the PlayFab errorCode |
status |
string |
String HTTP code |
PushNotificationPackage
Name | Type | Description |
---|---|---|
Badge |
number |
Numerical badge to display on App icon (iOS only) |
CustomData |
string |
This must be a JSON formatted object. For use with developer-created custom Push Notification plugins |
Icon |
string |
Icon file to display with the message (Not supported for iOS) |
Message |
string |
Content of the message (all platforms) |
Sound |
string |
Sound file to play with the message (all platforms) |
Title |
string |
Title/Subject of the message. Not supported for iOS |
PushNotificationPlatform
Name | Type | Description |
---|---|---|
ApplePushNotificationService |
string |
|
GoogleCloudMessaging |
string |
SendPushNotificationRequest
Name | Type | Description |
---|---|---|
AdvancedPlatformDelivery |
Allows you to provide precisely formatted json to target devices. This is an advanced feature, allowing you to deliver to custom plugin logic, fields, or functionality not natively supported by PlayFab. |
|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
Message |
string |
Text of message to send. |
Package |
Defines all possible push attributes like message, title, icon, etc. Some parameters are device specific - please see the PushNotificationPackage documentation for details. |
|
Recipient |
string |
PlayFabId of the recipient of the push notification. |
Subject |
string |
Subject of message to send (may not be displayed in all platforms) |
TargetPlatforms |
Target Platforms that should receive the Message or Package. If omitted, we will send to all available platforms. |
SendPushNotificationResult
Error Codes
Name | Code |
---|---|
PushNotEnabledForAccount | 1094 |
PushServiceError | 1095 |
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기