JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://js.jotform.com/JotForm.js?sensor=false&v=2323&dummy=.js"></script>
<div id="result"></div>
API-Key : <span id="key"></span>
JavaScript
JF.init({
//if set JF will remember user on next visit by cookie
//default false
enableCookieAuth : true,
//it will be visible on login window
//default HOST
appName: "YOUR_DESIRED_APP_NAME",
//can be "readOnly" or "full"
accessType: 'readOnly'
});
JF.login(
function() {
$("#result").html("User authorized");
$("#key").html(JF.getAPIKey());
},
function() {
$("#result").html("Could not authorize user");
}
);