Application manifest.jsonΒΆ

Each application has a manifest.json which specifies meta-data about the application. Meta-data included are the name and icon used for listing the application in the Speakap Market, and the entries by which the application can be accessed. Here is an example manifest:

{
    "name": {
        "en-US": "Speakap Example Manifest",
        "nl-NL": "Speakap voorbeeldmanifest"
    },
    "icon": "https://example.app.speakap.io/icon.png",
    "permissions": ["send_alerts"],
    "entries": [
        {
            "position": "main",
            "devices": "all",
            "url": "https://example.app.speakap.io/",
            "label": {
                "en-US": "Example app",
                "nl-NL": "Voorbeeld-app"
            },
            "icon": "\uf073",
            "responsive": true
        },
        {
            "position": "network-timeline-widget",
            "devices": "all",
            "url": "https://example.app.speakap.io/widget",
            "label": {
                "en-US": "Example widget",
                "nl-NL": "Voorbeeld-widget"
            }
        },
        {
            "position": "install-wizard",
            "devices": "all",
            "url": "https://example.app.speakap.io/install"
        }
    ],
    "redirectUris": [
        "https://example.app.speakap.io/login"
    ]
}

The most generic information are the name and icon, both of which are used for representing the application in the Speakap Market. For the name, as well as entry labels, it is important to have translations for every language relevant to the audience of your application. The “en-US” translation is always required as it will be used to present the name and labels to anyone using Speakap in a language for which the application does not provide an appropriate translation.

The permissions property is an array with permissions that the application requires. See Application Permissions.

The meat of the manifest is provided by the definitions of the entries. At least one entry should be provided, because without it the application would never be visible to the user, nor have any way of knowing it’s installed in the first place. Every entry has a position and a url, and optionally devices, a label and an icon may be provided. First, we’ll explain the different positions:

Position Label? Icon? Description
main Yes Yes The main position for applications is presented to the user when the user clicks on an application in the left-menu in the Speakap web application or a Speakap mobile application.
external Yes Yes Presented in the same way as the “main” position, but when clicked will open the URL in a new window instead of in an iframe. This position is mutually exclusive with “main”, therefore an application cannot have both.
network-timeline-widget Yes No The network timeline widget is a position among the list of widgets that are displayed on the right-hand side of the network timeline (the “homepage” of the Speakap web application). This position is not available on mobile.
install-wizard No No The installation wizard is presented when the application is installed by the network administrator. More about this can be found in the tutorial for creating an installation wizard.
settings-page No No The settings page is used for configuring the application after it has been installed. It works the same as the “install-wizard” position, but has the option to select a different lightbox template through the lightboxTemplate property.
*-lightbox No No Any position with a “-lightbox” suffix can be used for loading custom lightbox content. See openLightbox() for more information.

Before we continue, we’ll also explain all the properties allowed for defining an entry:

Property Description
position The position to which the entry applies (see table above).
devices The devices to which the entry applies. One of phone, tablet, desktop or all.
url The URL from which to load the position. This URL will be loaded through a signed request.
label The user-visible label to present the application entry. This should be specified as a dictionary of translations (see example).
icon The user-visible icon to present the application entry. This must be a Unicode codepoint in the Speakap icon font set: http://developer.speakap.io/content/uploads/icons/
lightboxTemplate Only applicable to the settings-page position, this property defines what kind of lightbox should be used for hosting the position. A value of save-cancel (the default) presents a lightbox with Save and Cancel buttons. A value of close presents a lightbox with just a single Close button.
responsive Only applicable to main position, this property specifies whether the application is able to use all available space of the “main” position. One of true or false.

Now you have an understanding of the properties that can be specified and the positions for which you create manifest entries, it is important to realize it is the combination of the position and the devices that define an entry. For example, you may specify one entry for the “main” position for “all” devices as in the example above, but if you wish to use different URL endpoints for providing an optimized experience for different form factors, you may specify three entries for the “main” position, one for “phone” devices, one for “tablet” devices and one for “desktop” devices.

Finally, you can specify one or more URLs in the redirectUris property. These URLs are required if you want to use OAuth 2.0 authentication and must match the redirect_uri specified to Speakap’s /auth endpoint. For more information, see our OAuth2 documentation