• 서비스
  • 가격
  • 리소스
  • 기술지원
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

Web

API Overview

API
Description
registerPush
Register push service (must call this API to use push service only after obtaining user consent for the privacy policy).
unRegisterPush
Disable push service.
addPushListener
Add a Push Listener.
removePushListener
Remove a Push Listener.

API Detail

Register Push Service

API

registerPush(options): Promise;

Parameter Options Description

Parameter
Type
Description
SDKAppID
Number
SDKAppID of the Push service. For reference: Quick Integration > Prerequisites > Enabling a Service to obtain SDKAppID.
appKey
String
Client key of the Push service. For reference: Quick Integration > Prerequisites > Enabling a Service to obtain AppKey
userID
String
Register the user's userID for push services. User's Unique Identifier, defined by you, can only include uppercase and lowercase letters (a-z, A-Z), digits (0-9), underscore, and hyphen.

Disabling Push Service

API

unRegisterPush(): Promise;

Adding a Push Listener

API

addPushListener(eventName: string, listener: (data: any) => void);

Parameter description:

Parameter
Type
Description
eventName
String
Push event type.
WebPush.EVENT.MESSAGE_RECEIVED: new notification arrival
WebPush.EVENT.MESSAGE_REVOKED: notification recall
WebPush.EVENT.NOTIFICATION_CLICKED: notification clicked
listener
Function
Push event handling method.

Removing a Push Listener

API

removePushListener(eventName: string, listener?: (data: any) => void);

Parameter description:

Parameter
Type
Description
eventName
String
Push event type.
WebPush.EVENT.MESSAGE_RECEIVED: new notification arrival
WebPush.EVENT.MESSAGE_REVOKED: notification recall
WebPush.EVENT.NOTIFICATION_CLICKED: notification clicked
listener
Function | undefined
Push event handling method.