Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanPaulvanderHam authored Apr 10, 2024
1 parent d6677eb commit 6848dde
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>
TattaTeun
</title>
</head>
<body>
<iframe id="chat" style="width: 400px; height: 400px;" src=''></iframe>
<iframe
src='https://webchat.botframework.com/embed/lang-099-jp-bot?s=r44Hw8495k0.P6cPwNzCecp8_RttRFSuBsygBn9I5u7c_61FAGFqRFE'
style='min-width: 400px; width: 100%; min-height: 500px;'></iframe>
</body>
<script>

var xhr = new XMLHttpRequest();
xhr.open('GET', "https://webchat.botframework.com/api/tokens", true);
xhr.setRequestHeader('Authorization', 'BotConnector ' + 'r44Hw8495k0.P6cPwNzCecp8_RttRFSuBsygBn9I5u7c_61FAGFqRFE');
xhr.send();
xhr.onreadystatechange = processRequest;

function processRequest(e) {
if (xhr.readyState == 4 && xhr.status == 200) {
var response = JSON.parse(xhr.responseText);
document.getElementById("chat").src="https://webchat.botframework.com/embed/<botname>?t="+response
}
}

</script>
</html>

0 comments on commit 6848dde

Please sign in to comment.