Documentation

imconnector.connector.data.set

The method sets data for REST connector.

Parameters

Method Description Available from version
CONNECTOR Connector ID
LINE Line ID to which connector is attached.
DATA Array with data to be saved:
  • id - ID of the account connected to this connector.
  • url and url_im - links to chat. Parameter url_im is used in widget. When not specified, just url will be used.
  • name - channel name to be displayed in widget.

Example

	//imconnector.connector.data.set
	function connectorDataSet()
	{
		var params = {
			CONNECTOR: 'myrestconnector',
			LINE: 1,
			DATA: {
				id: 123,
				url: 'http://localhost',
				url_im: 'http://localhost',
				name: 'My rest connector name'
			}
		};
		BX24.callMethod(
			'imconnector.connector.data.set',
			params,
			function (result) {
				if (result.error())
					alert("Error: " + result.error());
				else
					alert("True: " + result.data());
			}
		);
	}


© «Bitrix24», 2001-2024