API Reference version 2

Dialogs

Integrations can open modal dialogs in the main HipChat view. Dialogs can be opened either in response to a input or message action, or by using the Dialog JavaScript API in a sidebar.

API Documentation

See the API documentation for Dialogs

Descriptor Attribute Reference

Type Property Description Required?
string authentication

The authentication method for this dialog

Valid values: jwt, none.

Defaults to 'jwt'.

string key

Unique key (in the context of the integration) to identify this dialog.

Valid length range: 1 - 40.

Required
object options

Dialog options

object filter

If present, adds a filter box in the dialog header

object placeholder

The placeholder text for the filter box.

string i18n

The optional localization key, used to look up the localized value.

Valid length range: 1 - 40.

string value

The default text.

Valid length range: 1 - 100.

Required
object hint

The dialog hint, displayed in the left side of the bottom bar

string i18n

The optional localization key, used to look up the localized value.

Valid length range: 1 - 40.

string value

The default text.

Valid length range: 1 - 100.

Required
object primaryAction

The primary action of the dialog, rendered as a primary button.

boolean enabled

Whether button is disabled or enabled (default 'true')

string key

A key that can be used to register an event listener. Default 'primary-action-selected' for the primary action, none for secondary actions

object name

The localizable name of the button

Required
string i18n

The optional localization key, used to look up the localized value.

Valid length range: 1 - 40.

string value

The default text.

Valid length range: 1 - 100.

Required
array secondaryActions

The secondary actions of the dialog, rendered as link buttons.

An array of the following objects.

boolean enabled

Whether button is disabled or enabled (default 'true')

string key

A key that can be used to register an event listener. Default 'primary-action-selected' for the primary action, none for secondary actions

object name

The localizable name of the button

Required
string i18n

The optional localization key, used to look up the localized value.

Valid length range: 1 - 40.

string value

The default text.

Valid length range: 1 - 100.

Required
obj | str size

The size of the dialog

object [size, object 1]

A custom dialog size. adjusted to fit the contents

Required
string height

The height of the dialog, either in pixels ('px') or as a percentage ('%').

Required
string width

The width of the dialog, either in pixels ('px') or as a percentage ('%').

Required
string style

The dialog style (default is 'normal')

Valid values: normal, warning.

object title

The dialog title

Required
string i18n

The optional localization key, used to look up the localized value.

Valid length range: 1 - 40.

string value

The default text.

Valid length range: 1 - 100.

Required
string url

The url where the dialog content is hosted.

Required