Created
September 15, 2019 02:54
-
-
Save zerojame/eb249cac6a1a69309b3aacb3edcf710a to your computer and use it in GitHub Desktop.
noti-end-of-month#02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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