Raplet configuration parameters, described on this page, have been deprecated. We will continue to support them until at least February 2012. New Raplets should use the OAuth2-based configuration protocol instead, which provides greater control and a better user experience.
If your Raplet needs to be configured, you can specify a configuration property in the metadata object. When a user installs your Raplet, the configuration property is translated into a form on the install dialog, and Rapportive captures the user’s input on your behalf. Rapportive stores the user’s settings and includes the values as query parameters on every Raplet request.
The configuration property should contain a JSON array, each element of which is a JSON object with the following properties:
name: The name of the query parameter you want to use for this setting. We recommend that you limit yourself to alphanumeric and underscore (_) characters, and avoid any parameter names already used by Rapportive.
description: The label text you want to display for this form field, explaining what the setting is about. HTML is permitted (we generate the <label> tag, you provide the contents).
type: Tells us what kind of input control you want for this settings. Currently accepted values are text (a single-line text field) and password (a password field which masks its input).
required: Boolean; if set to true, the user is not allowed to leave this setting blank. This property is optional and defaults to false.
For example, a metadata response with configuration parameters may look as follows:
jsonp123456789({
"name": "Transmogrifier",
/* ... other metadata properties omitted for readability ... */
"configuration": [
{
"name": "magic_token",
"type": "text",
"description": "Your magic token (please copy and paste from <a href=\"http://example.com/account\">your account page</a>)"
}, {
"name": "secret",
"type": "password",
"description": "Your secret incantation",
"required": true
}
]
})
We ask you to keep the configuration as minimal and simple as possible. (The fewer settings a user can change, the less confusing they will find the experience of adding your Raplet, and the fewer mistakes they can make.) Only ask for things for which you cannot provide defaults, such as login details or user-specific API keys.