Skip to content

Instantly share code, notes, and snippets.

@alkateb
alkateb / Javascript-Dialogflow
Created March 21, 2018 19:30
Simply copy and paste the code and put your access token key, and you would have your bot ready
<html>
<head>
<title>Javascript-Dialogflow</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var accessToken ="INSERT YOUR ACCESS TOKEN";
var baseUrl = "https://api.dialogflow.com/v1/";
$(document).ready(function() {
$("#input").keypress(function(event) {