Skip to content

Instantly share code, notes, and snippets.

@Thainainan03
Created September 15, 2019 02:54
Show Gist options
  • Save Thainainan03/eb249cac6a1a69309b3aacb3edcf710a to your computer and use it in GitHub Desktop.
Save Thainainan03/eb249cac6a1a69309b3aacb3edcf710a to your computer and use it in GitHub Desktop.
noti-end-of-month#02
const request = require('request')
request({
method: 'POST',
uri: 'https://notify-api.line.me/api/notify',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
auth: {
'bearer': <access_token> //คัดลอก line notify access token มาวางไว้ที่นี้
},
form: {
message: message
}
}, (err, httpResponse, body) => {
if(err){
console.log(err);
} else {
console.log(body)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment