Skip to content

Instantly share code, notes, and snippets.

@bongkook
Created March 11, 2020 04:24
Show Gist options
  • Save bongkook/8be8649b958e68396acf6bc617e43c34 to your computer and use it in GitHub Desktop.
Save bongkook/8be8649b958e68396acf6bc617e43c34 to your computer and use it in GitHub Desktop.
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.telegram.org/" + telegram_bot_id + "/sendMessage",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"cache-control": "no-cache"
},
"data": JSON.stringify({
"chat_id": chat_id,
"text": message
})
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment