*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.

UserNotification

Đại diện cho một thông báo được gửi cho một người dùng.

Thuộc Tính

pathstring

Con đường tài nguyên của thông báo người dùng.

Định dạng: users/{user_id}/notifications/{user_notification_id}.

idstring
Chỉ Xuất

Một UUID duy nhất của thông báo người dùng.

sourceobject

Nguồn của thông báo.

payloadobject

Các thông báo payload.

URL Cơ Sở

https://apis.roblox.com
Tài nguyên UserNotification

{
"path": "users/123/notifications/01234567-ABCD-1234-ABCD-0123456789AB",
"id": "a6746f2e-2cc6-11ee-be56-0242ac120002",
"source": {
"universe": "universes/96623001"
},
"payload": {
"type": "TYPE_UNSPECIFIED",
"messageId": "5dd7024b-68e3-ac4d-8232-4217f86ca244",
"parameters": {
"key": {
"stringValue": "bronze egg"
}
},
"joinExperience": {
"launchData": "Launch Data"
},
"analyticsData": {
"category": "Bronze egg hatched"
}
}
}

UserNotification

Tạo thông báo người dùng

POST /cloud/v2/users/{user_id}/notifications

Gửi thông báo cho một người dùng.

Phạm Vi
user.user-notification:write
Yêu CầuTham Số Đường Dẫn
user_idstring
Bắt Buộc

ID người dùng.

Yêu Cầu Cơ ThểUserNotification
Phản HồiUserNotification
POST /cloud/v2/users/{user_id}/notifications

curl -L -X POST 'https://apis.roblox.com/cloud/v2/users/{user_id}/notifications' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"source": {
"universe": "universes/96623001"
},
"payload": {
"type": "TYPE_UNSPECIFIED",
"messageId": "5dd7024b-68e3-ac4d-8232-4217f86ca244",
"parameters": {
"key": {
"stringValue": "bronze egg"
}
},
"joinExperience": {
"launchData": "Launch Data"
},
"analyticsData": {
"category": "Bronze egg hatched"
}
}
}'
Phản Hồi

{
"path": "users/123/notifications/01234567-ABCD-1234-ABCD-0123456789AB",
"id": "a6746f2e-2cc6-11ee-be56-0242ac120002"
}