These docs are for v1.0. Click to read the latest docs for v3.0.

To initialize client access rollMyFile API you need to register your app at ???. Once you get a n API key, you can add rollMyFile API client to your page.


Domain whitelisting

The API key is tied to the domain, when you create an application. You can then use this key to access rollMyFile API only on that domain.

var key = "SeCur3AP1K3y";

var rollMyFile = new RollMyFile(key, function() {
  // oninitcomplete handler

During initialization rollMyFile API client makes a number of requests to rollApp backend. Until these requests are processed you should not use isBrowserSupported and getSupportedExtensions. If you need to perform your own initialization based, e.g. add "open online" button only for files, which can be open, you should do that in oninitcomplete handler.