# ShortCode::__construct()

URL: https://chugunov.pro/api-bitrix/main/authentication/shortcode/__construct/
Проверено на 1С-Битрикс 25.x, обновлено 03.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией 1С-Битрикс.

Класс: [`\Bitrix\Main\Authentication\ShortCode`](https://chugunov.pro/api-bitrix/main/authentication/shortcode/)
Модуль: Main.
Свойства элемента: method, public.

## Сигнатура

```php
public __construct(Context $context[, string $type = \Bitrix\Main\Authentication\Internal\UserAuthCodeTable::TYPE_EMAIL ]) : mixed
```

## Описание

Конструктор ShortCode.

## Параметры

- `$context` `Context` — обязательный. Содержит userId
- `$type` `string` — необязательный, по умолчанию `\Bitrix\Main\Authentication\Internal\UserAuthCodeTable::TYPE_EMAIL`. В настоящее время только 'email'

## Возвращаемое значение

`mixed`

Оригинал в официальной документации: https://docs.1c-bitrix.ru/api/classes/Bitrix-Main-Authentication-ShortCode.html
