Connector Settings Page SETTING_CONNECTOR

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Scope: imopenlines

The widget renders the application interface on the settings page of a custom open channel connector. This is where the user connects their communication channel: enters the login of an external service, selects an account, or confirms access.

The handler is connected not with the placement.bind method but with the PLACEMENT_HANDLER parameter of the imconnector.register method. Bitrix24 creates the binding to the placement itself when it registers the connector.

The widget is not displayed in the interface until the application installation is complete. Check the application installation

Where the Widget is Embedded

Placement Code

Location

SETTING_CONNECTOR

Settings page of a custom open channel connector

Where to Find It in the Interface

Open the contact center at /contact_center/ and click the tile of your connector. In the slider that opens, click Connect and select an open channel. The application interface is displayed between the connector header and the Open Channel and permissions block.

Widget on the connector settings page

The connector tile appears in the contact center right after the imconnector.register call — the name and the icon are taken from the NAME and ICON parameters.

What the Handler Receives

Data is sent in a POST request: some parameters come in the handler URL query string, the rest in the request body

Array
        (
            [DOMAIN] => xxx.bitrix24.com
            [PROTOCOL] => 1
            [LANG] => en
            [APP_SID] => 0123456789abcdef0123456789abcdef
            [AUTH_ID] => 6061e72600631fcd00005a4b00000001f0f1076700000000f69dd5fc643d9ce2fdbc1
            [AUTH_EXPIRES] => 3600
            [REFRESH_ID] => 50e00aa340631fcd00005a4b00000001f0f1071111116580a5b83c2de639ef28c12
            [SERVER_ENDPOINT] => https://oauth.bitrix.info/rest/
            [APPLICATION_TOKEN] => 5b2f8c1d7e3a9046b8c5d2f1a7e3b904
            [APPLICATION_SCOPE] => imopenlines,placement
            [member_id] => da45a03b265edd8787f8a258d793cc5d
            [status] => L
            [PLACEMENT] => SETTING_CONNECTOR
            [PLACEMENT_OPTIONS] => {"CONNECTOR":"my_connector","LINE":"3","STATUS":false,"ACTIVE_STATUS":true,"CONNECTION_STATUS":false,"REGISTER_STATUS":false,"ERROR_STATUS":false,"URI":"\/contact_center\/connector\/?ID=my_connector&IFRAME=Y&IFRAME_TYPE=SIDE_SLIDER"}
        )
        

Required parameters are marked with *

Parameters in the Handler URL Query String

Parameter
type

Description

DOMAIN*
string

The Bitrix24 address where the widget handler was invoked

PROTOCOL*
string

Secure or non-secure HTTP protocol:

  • 0 - HTTP
  • 1 - HTTPS

LANG*
string

The user interface language of Bitrix24 that invoked the widget. You can localize the interface language in your widget based on this value

APP_SID*
string

Application session identifier. Bitrix24 generates a new one each time the widget is rendered and uses it to link the js library with the application environment

Parameters in the POST Request Body

Parameter
type

Description

AUTH_ID
string

Authorization token OAuth 2 issued for the user who invoked the widget. Can be used for REST API calls on behalf of this user

AUTH_EXPIRES
integer

Time in seconds after which the authorization token will become invalid

REFRESH_ID
string

Refresh token OAuth 2 issued for the user who invoked the widget. Can be used to refresh the authorization token on behalf of this user

SERVER_ENDPOINT*
string

Address of the Bitrix24 authorization server needed to refresh OAuth 2 tokens

APPLICATION_TOKEN*
string

Application token. The same value is passed in the application_token parameter when event handlers are invoked. The widget handler can use it to verify that the request came from Bitrix24

APPLICATION_SCOPE*
string

List of scopes granted to the application, separated by commas. Shows which REST API methods are available with the authorization token received

member_id*
string

Unique string identifier of Bitrix24 where the widget handler was invoked.

status
string

Type of application that registered the handler for this widget. Accepts values:

  • L - local application
  • F - free mass-market application
  • D - demo version of a mass-market application
  • T - trial version of a mass-market application, time-limited
  • P - paid mass-market application

PLACEMENT*
string

The placement code. You can use the same handler URL for all your widgets. The value that Bitrix24 will report in the PLACEMENT parameter will help determine from which specific placement your handler was invoked in each case

PLACEMENT_OPTIONS
string

Additional data in the form of a JSON string that defines the context of the widget execution. For example, this could be an array containing the numeric identifier of the CRM object in the detail form where the widget handler was invoked, etc. The PLACEMENT_OPTIONS parameter, along with the PLACEMENT parameter, allows you to accurately determine for which specific placement and object the widget handler was invoked

Bitrix24 adds a URI key to PLACEMENT_OPTIONS — the path with the query string of the page from which the widget was opened. It arrives for any placement, along with the keys of that placement itself. The key is absent if the browser did not send the Referer header or if the widget was opened from a page on a different domain.

PLACEMENT_OPTIONS

The PLACEMENT_OPTIONS value is sent as a JSON string. It carries both the addressing of the call — which connector is being set up for which channel — and the current state of that connector.

Key
type

Description

CONNECTOR
string

Connector identifier — the ID value with which the application registered the connector using the imconnector.register method

LINE
string

Identifier of the open channel the settings page is opened for. The channel settings are returned by the imopenlines.config.get method

ACTIVE_STATUS
boolean

The connector is enabled for this channel. The value is changed by the imconnector.activate method

CONNECTION_STATUS
boolean

The connection to the external service is confirmed

REGISTER_STATUS
boolean

The channel is registered in the external service. Both flags are raised by the application with the imconnector.connector.data.set method when it saves the channel settings

ERROR_STATUS
boolean

The connector has an error. The flag is set by the imconnector.set.error method

STATUS
boolean

Final status: true when the connector is enabled, the connection and the registration are confirmed, and there are no errors. The same value is returned by the imconnector.status method

The state comes with every call, so the handler can show the right screen right away: the initial connection form if CONNECTION_STATUS is still false, or the settings of an already connected channel.

How to Connect the Handler

A separate placement.bind call is not needed for this placement. The handler address is passed once — when the connector is registered:

  • specify the address of the settings page in PLACEMENT_HANDLER of the imconnector.register method
  • Bitrix24 will create the binding to the SETTING_CONNECTOR placement and link it to the connector
  • to change the address, call imconnector.register again with the same ID

The placement does not support the OPTIONS parameters: there is no way to pass them when registering a connector.

Common Mistakes

Mistake

How to Solve

The handler was bound with the placement.bind method

The method accepts the SETTING_CONNECTOR code and creates a binding, but it does not appear on the settings page. Bitrix24 shows the binding that it created itself when registering the connector

The settings page is looked for before the channel is connected

Until Connect is clicked in the connector slider and an open channel is selected, there is no application interface on the page

The connector identifier does not match the stored one

The imconnector.register method converts ID to lowercase, and PLACEMENT_OPTIONS already contains the converted value. Compare the values in the same case

Continue Learning