Skip to content

Instantly share code, notes, and snippets.

@PamornT
Created September 23, 2019 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PamornT/0dcbe0fc6c93d01532f4a037f2668231 to your computer and use it in GitHub Desktop.
Save PamornT/0dcbe0fc6c93d01532f4a037f2668231 to your computer and use it in GitHub Desktop.
const reply_track = (req, payload) => {
return request({
method: `POST`,
uri: `${LINE_MESSAGING_API}/reply`,
headers: LINE_HEADER,
body: JSON.stringify({
replyToken: req.body.events[0].replyToken,
messages: [
{
"type": "flex",
"altText": "สถานะการส่งของ",
"contents": {
"type": "carousel",
"contents": [payload]
}
}
]
})
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment