Setting up Telegram authorization in 1C-Bitrix

Password login loses customers: some users leave without ever reaching their personal account. We set up Telegram authorization in 1C-Bitrix turnkey — from checking the current login to handing over regulations and support. We reduce the share of failed logins and offload the first line.

Our competencies:

Frequently Asked Questions

Telegram authorization in Bitrix: where login breaks

Login via messenger on a staging environment works on the first try, but on a live site with caching, a load balancer, and custom user fields, it fails.

A person clicks the login button, confirms access in the app, and returns to the same form, sometimes with an authorization error in the log, sometimes silently.

The most unpleasant scenario is when login formally succeeds, but after a minute the session resets: the user again sees the guest version, the cart and favorites are empty, and a repeated attempt gives the same result.

A separate category is profiles. The same person logs in from a phone and from a work machine, the messenger issues two different identifiers, and two accounts with the same email appear on the site.

The opposite also happens: after changing the account in the messenger, the link is lost, the link button in the account area does not work, and the user cannot return to their order history.

Duplicates then have to be merged manually, transferring orders, subscriptions, and rights settings.

And the most expensive in consequences: a custom login handler often bypasses the built-in 1C-Bitrix checks — address confirmation, blocking, group assignment. Externally it looks like a working button, but in fact it is an open door.

The consequence of all these failures is the same: the successful login rate falls, support load grows, and trust in the account area is lost. We will break down how this is closed.

What Telegram login gives: measurable effect

The effect of messenger login is measured not by convenience, but by authorization form metrics.

On a project with 1C-Bitrix, we first take a baseline measurement: successful login rate, number of abandoned registrations, volume of password-related requests, time from opening the form to login.

After connection, the same metrics are measured again on comparable traffic — the difference is the result.

  • Password resets. The customer does not search for an email or wait for a code: confirmation arrives in an open messenger, the abandoned recovery rate falls several times over, and the load on email sends decreases.
  • Registration is not interrupted. One step instead of a form and email confirmation — the completion rate for registrations grows, most noticeably on mobile traffic, where long passwords are most often abandoned.
  • Fewer support requests. Typical "email doesn't arrive," "I don't remember my password," and "can't get into my account" requests leave the flow: login is performed in one action, and account linking remains under the customer's control.
  • Higher successful login rate. Login and password no longer need to be remembered — the class of failures that cannot be cured by form hints or reminder emails decreases.
  • More repeat visits. When login takes one step, the customer returns to the account area more willingly — the share of customers with two or more logins and the number of repeat orders grow.

We record measurements in a report before and after: you can see which metric shifted and by how much, not just that it "became more convenient."

Login methods: comparison of options and limitations

Before connecting messenger login, it is worth laying out website authorization methods side by side: each has its own operating conditions and its own class of failures.

Below are the options we configure on 1C-Bitrix projects: from the standard login and password pair to confirmation via a third-party service.

Option When it fits Limitations
Login and password Basic login for customers and employees Forgotten and weak passwords, support load during resets
One-time code by email One-off logins, access recovery Requires mailbox access, emails are cut by spam filter
Confirmation via Telegram Audience lives in messenger, passwordless login needed Dependence on external service, linking to phone number
Corporate user directory Employees with domain accounts Requires a configured directory, not suitable for external customers

What is behind the limitations

The limitation of login via a third-party service is primarily an external dependency: if the messenger is unavailable or changes linking rules, the user cannot log in.

The second point is that the identifier is tied to a phone number, and changing it breaks the connection with the website profile if a backup method link is not provided.

Therefore, we almost always make password or messenger login as a pair: messenger as the fast primary channel, password or one-time code as backup. The log records how they logged in and when the link changed — investigating an access incident takes minutes.

Implementation procedure: from login audit to handover

Messenger login looks like connecting a ready-made extension, but it breaks where some employees and customers already have accounts on the site.

We will break down how messenger login implementation proceeds: first a website authorization audit, then a profile matching scheme, setup, a test verification environment, and handover.

  1. Inventory of login scenarios. We collect all active methods: password, service buttons, corporate provider, customized handlers. We mark places where roles, groups, and cart change after authentication — they will need to be affected.
  2. Profile linking scheme. We determine the matching attribute (confirmed number, email, code), behavior on match and collision, rules for creating a new record, and what the user sees if the account is already taken.
  3. Login setup. Bot registration, public handler URL, keys, domain restriction, group rights on first login, keeping the previous method as backup.
  4. Migration of existing users. Bulk linking by the selected attribute, resolution of duplicates and profiles without contacts, verification that password login continues to work.
  5. Test verification environment. A copy of the database and a separate subdomain, running scenarios: first login, repeat login, account unlinking, access revocation, external service unavailability.
  6. Handover of settings to the customer. Configuration documentation, bot access credentials, key rotation policy, training administrators to handle typical requests.

After handover, we enable login logging and keep the environment for testing future updates.

Handover package: configurations, schemes, policies

After delivery, the project retains not only working Telegram login, but also a package by which an administrator or a new engineer can reproduce the setup without us.

We hand it over together with access credentials and walk through it on a call, so future edits do not turn into a thread asking "how was this put together."

Each document is tied to what actually exists in the system: settings files, group rights, page and email templates. Below is what exactly is included in the package.

  • Authorization scheme: the sequence of steps from clicking the login button to session creation, with failure points and a description of what the user sees at each step.
  • Profile linking settings: what data is pulled into the profile, what happens when the identifier changes or the external account is deleted, how the link is removed manually.
  • User access matrix: mapping of external groups to groups and roles on the site, who gets access to restricted sections, and who is not automatically granted access.
  • Website login policy: procedure for the user and administrator in typical situations — access loss, login from a new device, duplicate profile.
  • Support policy: what to do when the external service is unavailable, how to temporarily restore the backup login method, and how this is reflected in logs.
  • Authorization documentation: connection parameters and keys — where they are stored, how they are updated, and who is responsible for rotation.
  • Administrator guide: step-by-step setup from scratch on the test environment plus a pre-deployment checklist before production.

Case study: how messenger login reduced support load

A case study of setting up authorization on a portal with an account area: several thousand organizations, each creating several employees with different rights.

What it was like before implementation

Login relied only on the email and password pair, and reset was by email.

Customers had corporate mailboxes, so the email did not always arrive; therefore, the successful login rate stayed at two-thirds: the remaining attempts ended in another reset, a call to support, or the person leaving and returning to work in the account area the next day. "I can't log in" requests accounted for about a third of first-line support load.

What was changed and what happened

We added login via Telegram: the customer confirms their number in the messenger, the server verifies the signature of the received data, matches the number with the account, and starts a session with a limited lifetime.

The password was kept as a backup method, and a one-time email link appeared next to it — for cases when the messenger is unavailable on a work device.

For employees, we made a separate scenario with linking to an internal account and its own access rules, and all login attempts are logged with the method identifier.

Results of login implementation: the successful login rate rose from two-thirds to 97%, and access-related support load dropped fourfold — the freed first-line hours went to consultations on using the account area rather than password recovery.

Repeat login no longer depends on the customer's email filters: email is no longer the single point of failure, and the scenario retains a clear fallback to password.

How is messenger login different from password login?

The user sees only the messenger login button, but for the system these are two different identity verification methods.

The password is checked against a hash in the user database, while login via Telegram is checked against a signature formed by the messenger and verified by our server on every request. This is where reliability and access recovery scenarios diverge.

Criterion Login and password Telegram login
How identity is confirmed Password hash in database Signature from messenger
What the user does Enters and remembers password Confirms login in app
Access recovery Reset by email, waiting, contacting support Repeat login from own account
What is stored on server Password hash, reset history Link identifier, passwords are not stored
Typical requests "Email doesn't arrive," "forgot password" Linking and unlinking the channel

The difference is most evident in access recovery. The password scenario depends on email and manual support check, while the user can unlink and restore the messenger link themselves — administrator intervention is needed only when changing the account.

More reliable is not either/or, but a combination: messenger as the primary channel, password as backup in case of account access loss. In such a scheme, the failed login rate falls, and support load shifts from manual resets to rare linking questions.

Common technical questions: sessions, rights, rollback

Before starting, administrators and engineers ask the same set of questions: how will login via Telegram coexist with current profiles, what will happen with active sessions, can access be limited by groups, and how to roll back changes. Below are short answers to each point.

How does messenger login coexist with current profiles?

Matching is by account identifier; phone and email are secondary keys. If they match, the user goes into the existing profile: groups, rights, and history are preserved; if no link exists, a new account is created with a minimal set of fields.

What to do when user contacts change?

Relinking does not create a new profile: the administrator removes the old link and links the new account to the same account. Access rights and request history remain in place.

What happens to the user session?

The session is created by the platform's built-in mechanism, so its lifetime and termination rules are set by the general site policy.

Logout clears both the server record and the browser marker, and forced session termination by the administrator works the same as with password login.

Can login be limited by access groups?

Yes. Rights are checked against groups already configured in the system, so access to sections and the admin area does not change. You can allow login only for certain groups — others will be denied after confirmation without creating an account.

How to roll back changes if something goes wrong?

The login handler is connected separately from the main authorization, so rollback is disabling it: login by username and password continues to work normally. The link table is stored separately and is not deleted, so re-enabling does not require new profile matching.

Let's discuss the task: where to start and what is needed

For the estimate for Telegram login work to be accurate and the implementation plan not to need rework halfway through, a few inputs are enough for us. The more specific the initial data, the fewer assumptions in the estimate and the faster we will return with a solution scheme.

Below is what to prepare for the conversation; some points are resolved in five minutes if there is access to the project.

  • site address and staging address, access to the 1C-Bitrix control panel or a project copy;
  • platform version and edition — this determines whether built-in tools are sufficient or authorization module refinement is needed;
  • current login methods: login-password form, social networks, corporate portal — what already works and what is unsatisfactory;
  • how user accounting is set up: own tables, external database, exchange with 1C, synchronization of groups and roles;
  • requirements for the login scenario: linking to an existing profile, creating a new one, access only for certain groups;
  • security restrictions: what profile data is allowed to be received and stored, whether user consent requirements exist;
  • who decides on the scenario and by what deadline the result is needed — to agree on the implementation plan by stages.

If some data is missing, this does not block the start: we will discuss the authorization task and specify what needs to be clarified during the discovery phase.

Describe the situation in a few sentences — we will return with a work estimate, scope of changes, and login implementation plan.