FCM Integration API
Tài liệu này hướng dẫn tích hợp FCM (Firebase Cloud Messaging) vào PangoCDP để gửi notification từ Pango đến Mobile App. Bạn có thể tạo Kịch bản tự động từ DMA để gửi theo sự kiện hoặc segment.
Token Subscription API
API này cho phép client push Firebase App Token vào PangoCDP.
Information
Endpoint
Method
POST
Header
content-type: application/json
reqId=fcm************* (Pango provides)
cdpKey= (Pangpo provides)
Path Parameter
Payload
Payload
clientAppId
Yes
Client App Id / Name.
Loyalty Android
Loyalty for MS
token
Yes
Firebase App Token
loginUId
Yes
Login User ID
email@bytetech.io
loginUIdField
Yes
Field type of Login User ID. Valid values:
CustomerId
Email
Phone
UserId
Cid
userId
If loginUIdField=UserId, then require userId.
dee88
customerId
If loginUIdField=CustomerId, then require customerId.
C09999991
phone
If loginUIdField=Phone, then require PHONE.
0909999999
If loginUIdField=Email, then require EMAIL.
email@bytetech.io
cid
If loginUIdField=UserId, then require CID.
2125546.967878
uniqueId
Related to Device. For example, In iOs: identifier for vendor
deviceInfo
A List of values with prefix
[ “os: iOs”, “osv: 12.0”]
extParams
A List of values with prefix if more information needs to be tracked
[ “value1”, “...”]
Sample Request
loginUIdField=Phone
loginUIdField=CustomerId
Response
400
401
200
FCM Token Unsubscribed
API này cho phép client delete Firebase App Token trong PangoCDP
Information
Endpoint
Method
POST
Header
content-type: application/json
reqId=fcm************* (Pango provides)
cdpKey= (Pango provides)
Path Parameter
Payload
Payload
clientAppId
Yes
Client App Id / Name.
Loyalty Android
Loyalty for MS
token
Yes
Firebase App Token
Sample Request
Response
400
401
200
FCM Message Structure
To push messages to Devices / Topic based on Firebase, PangoCDP provides a tool to build templates, then JSON messages to push to clients.
Structure
cdpAck
This value is used for acknowledgement.
Clients that received the messages will push back PangoCDP this value to notify that the messages are delivered successfully.
android
apns
Acknowledge Event API
This API allows clients to push “Acknowledge Messages” back to PangoCDP. With each message delivered by Firebase, PangoCDP needs to know its status like: received, clicked.
Information
Endpoint
Method
POST
Header
content-type: application/json
reqId=fcm************* (Pango provides)
cdpKey= (Pango provides)
Path Parameter
Payload
Payload
clientAppId
Yes
Client App Id / Name.
Loyalty Android
Loyalty for MS
eventName
Yes
Event name from Client sent back:
received: The message is received by a device
clicked: User clicked on the message on Phones
received
cdpMsgId
Yes
When pangCDP pushes a message to a device, a key: “” will be appended to the data message.
The client sends the value of “” back to PangoCDP along with “eventName” to inform CDP that the message has been delivered successfully.
fcm...
extParams
A List of values with prefix if more information needs to be tracked
[ “value1”, “...”]
Sample Request
Response
400
401
200
Push Original Message / In-house Message API
This API allows clients to push “Original Messages” or “In-house Messages” to PangoCDP.
Information
Endpoint
Method
POST
Header
content-type: application/json
reqId=fcm************* (Pango provides)
cdpKey= (Pango provides)
Path Parameter
Payload
Payload
The payload contains a List of Events. Allowed size: [1 - 50]
clientAppId
Yes
Client App Id / Name.
Loyalty Android
Loyalty for MS
templateId
Yes
The template Id in your system
fcmToken
Yes
Firebase token
msgId
Yes
The message is created by your system
Any text
fmsgId
Firebase Message-Id. The id is returned by Firebase after the message sent
eventAt
Yes
Event Time - Timestamp with millisecond
1665041443000
userId
User Id in your system
customerId
Customer Id
phone
Phone number
Email Address
note
Some notes
tags
List of Tags
deviceInfo
Device information, following the keys:
brand
model
os
osv
extParams
More information if you want to push.
Sample Request
Response
400
401
200
Last updated
Was this helpful?