Getting started with the JS API

In order to embed Partoo inside your own webpage, you can use our javascript API.

You can import our Javascript API by adding this script in your <head> :

<script src="" type="text/javascript"></script>

It gives you access to our global Partoo namespace.

⚠️ Please note that if you are using our test environment for our development, you must change by

Instanciating Partoo on your webpage

To add the partoo interface on a part of your website, do the following:

(for token generation please see the section dedicated to the authorization process through the REST API authorize_authorizing)

var userToken = 'userTokenGeneratedServerSide'; // User Token you generated server side thanks to the authorize endpoint

var options = { // this is a list of options you can configure to adapt page display/behaviour
        'startPage': 'presenceManagement', // here the user will be redirected to the presenceManagement view after logging
        'displayIntercom': false, // true by default
        'displayUserParams': false, // true by default
        'displayAddButton': false, // true by detault

var partooPage = Partoo.init(
); // instantiates the Partoo page (A loader appears)

partooPage.login(userToken) // logs the user and redirects him to the `startPage`

Schema of a possible integration:

Alternative text

Destroying Partoo page after use

To remove the partoo interface, just do the following (it will automatically logout the user).