Overview
Use HealthCheck.make() to check the availability of Bitrix24 REST API. The method returns a Promise with a boolean value indicating API availability.
// Basic usage
const isHealthy = await $b24.tools.healthCheck.make()
if (isHealthy) {
console.log('Bitrix24 API is available')
} else {
console.error('Problems accessing Bitrix24 API')
}
Method Signature
make(
options?: { requestId?: string }
): Promise<boolean>
Parameters
Return Value
Promise<boolean> — a promise that resolves to a boolean value:
true— REST API is available and responding, webhook is configured correctly.false— REST API is unavailable, an error occurred, or necessary access rights are missing.
Error Handling
HealthCheck.make() never throws. Network failures, HTTP errors, missing scopes, and timeouts are all collapsed into a return value of false. The method is intentionally a black-box probe — for actionable error information, call the underlying method directly with CallV2.make() and inspect AjaxResult (isSuccess, getErrorMessages()).