tencent cloud

Chat

製品の説明
製品の概要
Basic Concepts
ユースケース
機能概要
アカウントシステム
ユーザープロフィールとリレーションシップチェーン
メッセージ管理
グループシステム
Official Account
Audio/Video Call
使用制限
購入ガイド
課金概要
価格説明
Purchase Instructions
Renewal Guide
支払い延滞説明
Refund Policy
ダウンロードセンター
SDK & Demo ソースコード
更新ログ
シナリオプラン
Live Streaming Setup Guide
AI Chatbot
極めて大規模なエンターテインメントコラボレーションコミュニティ
Discord実装ガイド
ゲーム内IM統合ガイド
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
クライアントAPIs
SDK API(Web)
Android
iOS & macOS
Swift
Flutter
SDK API(Electron)
SDK APIs (Unity)
SDK API(React Native)
C APIs
C++
サービス側 APIs
UserSigの生成
RESTful APIs
Webhooks
コンソールガイド
New Console Introduction
アプリケーションの作成とアップグレード
基本設定
機能設定
アカウント管理
グループ管理
Official Channel Management
コールバック設定
監視ダッシュボード
Viewing Guide for Resource Packages
Real-Time Monitor
補助ツールの開発
アクセス管理
Advanced Features
よくあるご質問
uni-app FAQs
 購入に関する質問
SDKに関する質問
アカウント認証に関する質問
ユーザープロファイルとリレーションシップチェーンに関する質問
メッセージに関する質問
グループに関する質問
ライブ配信グループに関する質問
ニックネームプロフィール画像に関連した問題
一般的なリファレンス
Service Level Agreement
セキュリティコンプライアンス認証
IM ポリシー
プライバシーポリシー
データプライバシーとセキュリティ契約
エラーコード
お問い合わせ

Web

フォーカスモード
フォントサイズ
最終更新日: 2025-12-23 17:13:31

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.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック