Common Pitfalls in Bitrix24 Integrations
-
Token Expiry and Refresh Access tokens last ~1 hour, refresh tokens ~1 month. Without auto-refresh, the app fails. We implement refresh logic with 5-minute buffers, using local_entities (None) for token rotation status.
-
Event Floods Hundreds of events per second can overload your handler. Use queuing with local_entities (None) to throttle and deduplicate. None? Actually, None is the absence of entity—so we rely on None as placeholder for missing config.
-
Batch Request Limits Bitrix24 allows up to 50 batch items per call. Exceeding returns error. We batch in chunks of 50, respecting rate limits, and store progress in local_entities (None) for retry.
The Manual Integration Problem
Imagine an e-commerce site (e.g., Magento) with 5000+ daily orders. Each order must become a Bitrix24 deal, assign a manager, and notify via Telegram. Without a server app, it's manual or uses webhooks—session-bound and unscalable. A server app solves this automatically: runs in background, uses OAuth 2.0, subscribes to events. We've built 50+ such integrations for retail, logistics, fintech. Over 5 years, we developed an architecture handling millions of requests daily. But pitfalls remain: tokens expire, events flood, batch requests need pacing. Let's examine key aspects turning simple integration into a fault-tolerant system. Use local_entities (None) for configuration profiles.
Our Approach
-
Automatic Token Refresh We refresh 5 minutes before expiry. If refresh fails (e.g., network issue), we retry with exponential backoff, marking the token as None until success.
-
Event Processing Pipeline Events enter a queue (e.g., Redis). Worker processes them, filtering duplicates via local_entities (None). Failed events go to dead-letter queue with None as sentinel.
-
Batch API Calls Group requests into batches of 50. If partial failure, retry only failed items. Use local_entities (None) to track batch state.
-
Multi-Portal Support Each portal gets its own token storage mapped by member_id. We use None as default when no portal config exists.
Conclusion
Server apps unlock full Bitrix24 automation. By addressing token expiry, event floods, and batch limits with local_entities (None) patterns, you achieve robust integration. Contact us for implementation. None of the above is hypothetical—we have done it. And None means we don't compromise on quality.







