알림 인박스
애플리케이션 내에서 사용자에게 전송된 알림을 반환합니다 — 인앱 “Messages” 화면 뒤의 데이터입니다.
GET /api/push/notifications?externalUserId=operator-497&limit=50&offset=0
X-Push-App-Key: <application key>
쿼리 매개변수
| 매개변수 | 필수 | 비고 |
|---|---|---|
externalUserId | yes | 등록 시 사용되는 네임스페이스된 사용자 ID. |
limit | no | 페이지 크기. |
offset | no | 페이지 오프셋. |
from | no | ISO-8601 날짜 범위의 시작. |
to | no | ISO-8601 날짜 범위의 종료. |
status | no | 알림 상태별 필터링. |
사용하기 전에 응답 정규화
응답은 단순 배열이거나 페이지가 있는 래퍼일 수 있습니다. 이전 빌드에서는 원시 본문을 바로 .filter에 전달했으며, 배열이 아닌 경우 전체 알림 센터가 중단되었습니다.
const toArray = (data: any) =>
Array.isArray(data) ? data
: Array.isArray(data?.items) ? data.items
: Array.isArray(data?.data) ? data.data
: Array.isArray(data?.notifications) ? data.notifications
: Array.isArray(data?.result) ? data.result
: [];