Use the same direct link, you can load Qiota.js directly. Once loaded, qiota library will be

available on your website.

Adding the <script> tag loads Qiota’s JavaScript file.You may include this either within your <head> tag or inside the <body> part of your HTML, before the end of the page



<script src= "https://(beta/www).qiota.com/assets/getQiota.js" ></script>


The <div> qiota_sub tag container

The getQiota.js file allows you to render a Qiota widget on the client side.

Configure the container and form where the Qiota Widget will add the elements. Make sure to replace TOKEN CLIENT with your generated client token.


...
<div class= "qiota_sub" > </div>
...


The widget will appear exactly where this <div> tag is included on your page. When the

getQiota.js file is loaded, this <div> tag will get populated.

If you want the integration in modal dialog you just have to embed the qiota_sub div in your

modal class in the. Then you have to add the trigger in your link, here an example.

Requirements for this exemple : JS Boostrap library and JS jquery Library

The widget will appear exactly where this <div> tag is included on your page. When the

getQiota.js file is loaded, this <div> tag will get populated.

If you want the integration in modal dialog you just have to embed the qiota_sub div in your

modal class in the. Then you have to add the trigger in your link, here an example.

Requirements for this exemple : JS Boostrap library and JS jquery Library



...
<a href=" # " onclick=" openModal() ">SUBSCRIBE</a>
...
< script type= "text/javascript" >
function openModal(){
$(' #dialog_qiota' ).modal();
}
< /script >
<div>


<div id=" dialog_qiota " class=" modal fade in ">
<div class=" modal-dialog ">
<div class=" qiota_sub "></div>
</div>
</div>

Call widget without Paywall

Once get the authorization you can call method for get elements subscription form.


< script type = "text/javascript" >
var q_token = "ACCESS_TOKEN" ; //required
var q_urlcallback = "https://yourserver/qiota_return" ; //required
// The QiotaSub widget will be rendered in an html element :
// <div class="qiota_sub"></div>
renderQiotaSub(q_token, q_urlcallback);
< /script >


The qiota_sub div will be populated for login of the user. After login success, the Qiota

system checks whether the article exists and whether the access right is still valid, and

sends a parms on the UrlCallBack by the Get method.

The variable for q_urlcallback can be the same as for the paywall method put in Dashboard.



Response from QiotaSub

Once the QiotaSub complete the process, the system sends on URLCALLBACK the 

informations about process.