When this API is called, the IAP server sends a test notification to your server.
Only one call is allowed within a 5-minute window. Once your server receives the test notification, it is not recommended to call this API again.
Test notifications can only be sent to a server in the production environment.
The type of the test notification is TEST, and there is no notification subtype. For details, please refer to NotificationType.
Protocol: HTTPS POST
Direction: Your server -> IAP server
API URL: {rootUrl}/harmony/v1/application/notifications/test
Note: The value of rootUrl varies depending on the site. For details, please refer to Site Information.
Data format:
Request: Content-Type: application/json; charset=UTF-8
Response: Content-Type: application/json; charset=UTF-8
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Content type. The value is application/json;charset=UTF-8. |
| Authorization | Yes | String | Authentication information. JWT is used for authentication. For details, please refer to Authorization Description. |
POST /harmony/v1/application/notifications/test Content-Type: application/json;charset=UTF-8 Authorization: Bearer ***.***.*** Accept: application/json
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Content type. The value is application/json;charset=UTF-8. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| responseCode | Yes | String | Response code. 0: success Other values: Failure. For details, please refer to error codes. |
| responseMessage | No | String | Response description. |
| testNotificationId | Yes | String | Test notification ID. |
HTTP/1.2 200 OK
Content-Type: application/json;charset=UTF-8
{
"responseCode": "0",
"testNotificationId": "***"
} {
"notificationType": "TEST", // The value is fixed at **TEST**.
"notificationRequestId": "xxx",
"notificationMetaData": {
"environment": "NORMAL", // The value is fixed at **NORMAL**.
"applicationId": "xxx", // App ID.
"packageName": "testPackageName", // The value is fixed at **testPackageName**.
"type": 0, // The value is fixed at **0**.
"purchaseToken": "xxx", // The prefix is fixed at **testPurchaseToken**, followed by the app ID.
"purchaseOrderId": "xxx" // The prefix is fixed at **testPurchaseOrderId**, followed by the app ID.
},
"notificationVersion": "v3", // The value is fixed at **v3**.
"signedTime": 1747445946282
}