Working Example

Below is the easiest example of how to interact with the JS interface. The client’s browser can directly receive data from using a callback function.

If a backend server needs to act on behalf of a user, see the using a redirect URI page. Otherwise, see the auth functions page for more details about getting users logged in.

<!DOCTYPE html>
<script src=""></script>
<a href="#" id="idnet-login">Login</a>
<a href="#" id="idnet-register">Register</a>
<script type="text/javascript">
    window.idAsyncInit = function() {
        // use an event to wait until after init
        ID.Event.subscribe('id.init', function(){
            // use jquery to call methods on clicks
        // using an optional callback to capture data on the client
        var idCallback = function(response){
            if (response) { // That means that the server processed the response
        // init the JS interface
            appId : 'YOUR APP ID'
    // load the idnet js interface
    (function(d, s, id){
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {return;}
        js = d.createElement(s); = id;
        js.src =  document.location.protocol == 'https:' ? "" : "";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'id-jssdk'));