Hey! These docs are for version 1.0, which is no longer officially supported. Click here for the latest version, 3.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.