Get the Connection Configuration for Push&Pull Servers pull.application.config.get
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:
pullWho can execute the method: any user authorized in the application
The method pull.application.config.get returns the connection configuration for the Push&Pull servers for the current application.
The method works only in the context of an application. The request is executed with the application OAuth token and the pull scope, and a webhook does not create such a context.
The client builds the connection address from the method response. The server address is taken from server.websocket_secure or server.long_pooling_secure, and the channel identifiers are taken from channels.private.id and channels.shared.id and are substituted into the address in exactly that order. How to build the address manually is described in the Custom Push&Pull Client article; in the browser this is done by the built-in client — Push&Pull in the Browser.
The configuration is personal: channels.private and publicChannels belong to the user whose token the request is executed with. One configuration cannot be handed out to several users — request it for each of them separately.
Track the end time of each channel and the exp field in the response. When the time expires, request the configuration again. If there is no exp field in the response, rely on the end of the channel.
Method Parameters
Required parameters are marked with *
The method has no required parameters.
|
Name |
Description |
|
CACHE |
The indicator of cache usage:
By default, the cache is used. In the current version of Bitrix24 the parameter has no effect on the returned configuration: the cache is always used |
|
REOPEN |
The indicator of issuing a new channel if the current one has expired:
By default, a new channel is issued. In the current version of Bitrix24 the parameter has no effect on the returned configuration: an expired channel is always issued anew |
Code Examples
How to Use Examples in Documentation
An example of retrieving the Push&Pull configuration for an application. The method is called without parameters.
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"auth": "**put_access_token_here**"
}' \
"https://**put.your-domain-here**/rest/pull.application.config.get.json"
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
try {
const response = await $b24.actions.v2.call.make<Record<string, any>>({
method: 'pull.application.config.get',
params: {},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info('Push&Pull config:', result)
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function getApplicationPullConfig() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'pull.application.config.get',
params: {},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info('Push&Pull config:', result)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getApplicationPullConfig)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.pull.application.config.get().response
print(bitrix_response.result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
try {
$response = $b24Service
->core
->call('pull.application.config.get');
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error getting pull config: ' . $e->getMessage();
}
BX24.callMethod(
'pull.application.config.get',
{},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.info(result.data());
}
}
);
$result = CRest::call('pull.application.config.get');
echo '<pre>';
print_r($result);
echo '</pre>';
Response Handling
HTTP Status: 200
{
"result": {
"server": {
"version": 4,
"server_enabled": true,
"mode": "personal",
"hostname": "your-account.bitrix24.com",
"long_polling": "https://rtc-**.bitrix24.com/sub2/",
"long_pooling_secure": "https://rtc-**.bitrix24.com/sub2/",
"websocket_enabled": true,
"websocket": "wss://rtc-**.bitrix24.com/subws2/",
"websocket_secure": "wss://rtc-**.bitrix24.com/subws2/",
"publish_enabled": true,
"publish": "https://rtc-**.bitrix24.com/rest/",
"publish_secure": "https://rtc-**.bitrix24.com/rest/",
"config_timestamp": 1774886062
},
"api": {
"revision_web": 19,
"revision_mobile": 3
},
"channels": {
"shared": {
"id": "***masked***",
"start": "2026-03-31T17:05:18+02:00",
"end": "2026-04-01T05:05:23+02:00",
"type": "shared"
},
"private": {
"id": "***masked***",
"public_id": "***masked***",
"start": "2026-03-31T17:05:18+02:00",
"end": "2026-04-01T05:05:23+02:00",
"type": "private"
}
},
"exp": 1775052318,
"publicChannels": {
"577": {
"user_id": 577,
"public_id": "***masked***",
"signature": "***masked***",
"start": "2026-03-31T10:06:39+02:00",
"end": "2026-03-31T22:06:44+02:00"
}
}
},
"time": {
"start": 1774965918,
"finish": 1774965918.322255,
"duration": 0.32225489616394043,
"processing": 0,
"date_start": "2026-03-31T17:05:18+02:00",
"date_finish": "2026-03-31T17:05:18+02:00",
"operating_reset_at": 1774966518,
"operating": 0
}
}
If Bitrix24 runs on the shared Push&Pull server, clientId additionally arrives in result. The example shows only the differences from the response above:
{
"result": {
"server": {
"mode": "shared",
"version": 4
},
"clientId": "***masked***"
}
}
Returned Data
|
Name |
Description |
|
result |
An object of the format:
where:
The fields of the |
|
time |
Information about the request execution time |
Result Object
The composition of the fields depends on the settings of the Push&Pull server — the exp, clientId, and jwt fields do not always arrive.
|
Name |
Description |
|
server |
The parameters of the Push&Pull server more details |
|
api |
The revisions of the Push&Pull protocol. The client uses them to check whether its library version is compatible with the server: |
|
channels |
The application channels. It contains two channels: The channel fields — (detailed description). The order in which the channel identifiers are substituted into the connection address is described in the Custom Push&Pull Client article |
|
exp |
The validity period of the configuration as a Unix timestamp. In Bitrix24 cloud the configuration is valid for 24 hours from the moment of the request. In the self-hosted version the field arrives if the administrator has set this period. With server version 5 and higher the field always arrives and matches the validity period of |
|
The public identifier of the personal channel of the current user. This is the user's channel in Bitrix24, not a channel of the application. If the version of the Push&Pull server is lower than 4, the field arrives with the Format:
where:
|
|
|
clientId |
The public identifier of Bitrix24 on the shared Push&Pull server. It is returned when |
|
jwt |
The JWT token for connecting to the server. When it is present, the channels are already embedded in the token and It is returned when |
Server Object
|
Name |
Description |
|
version |
The version of the Push&Pull server. The connection protocol and the way the channel history is handled depend on it — the details are in the Custom Push&Pull Client article. In the |
|
server_enabled |
The indicator of server availability. If the value is |
|
mode |
The server mode:
|
|
hostname |
The Bitrix24 domain |
|
long_polling |
The long polling URL |
|
long_pooling_secure |
The long polling URL for a secure connection. The field name arrives from the API with a typo — |
|
websocket_enabled |
The indicator of websocket availability. If the value is |
|
websocket |
The websocket URL |
|
websocket_secure |
The websocket URL for a secure connection. The connection parameters are passed in the address, so connect over the secure address. On the shared Push&Pull server |
|
publish_enabled |
The indicator of publish API availability |
|
publish |
The publish API URL |
|
publish_secure |
The publish API URL for a secure connection |
|
config_timestamp |
The version stamp of the configuration |
Shared and Private Channel Object
|
Name |
Description |
|
id |
The channel identifier |
|
public_id |
The public identifier of the channel. For the |
|
start |
The time the channel was issued |
|
end |
The time the channel stops working — 12 hours after it was issued |
|
type |
The channel type:
|
Error Handling
HTTP Status: 403
{
"error": "WRONG_AUTH_TYPE",
"error_description": "Get access to application config available only for application authorization."
}
HTTP Status: 500
{
"error": "SERVER_ERROR",
"error_description": "Push & Pull server is not configured"
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Status |
Code |
Description |
Value |
|
|
|
Get access to application config available only for application authorization. |
The method was called outside the context of an application, for example, through a webhook |
|
|
|
Push & Pull server is not configured |
The Push&Pull server is not configured or is disabled in Bitrix24 |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
The REST API is available only on commercial plans. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |