Skip to content

Commit 3ade21e

Browse files
authored
create transactional notification
1 parent ba52bad commit 3ade21e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const pusheToken = "XXXXXXX";
2+
const pusheUrl = `https://api.pushe.co/v2/messaging/rapid/`;
3+
4+
let options = {
5+
headers: {
6+
'Authorization': 'Token ' +pusheToken,
7+
'Content-Type': 'application/json'
8+
}
9+
};
10+
11+
let req = {
12+
app_id: 'XXXX',
13+
data: {
14+
title: "title",
15+
content: "content".
16+
},
17+
device_id: [device_id , device_id , device_id]
18+
};
19+
20+
axios.post(pusheUrl, req, options)
21+
.then(({data}) => console.log(data))
22+
.catch(err => console.error(err));
23+

0 commit comments

Comments
 (0)