---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.ru/dev/dialogs/smart-home/doc/en/auth/create-server.md
  - https://yandex.ru/dev/dialogs/smart-home/doc/ru/auth/create-server.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/dialogs/smart-home/doc/en/llms.txt

# Set up an authorization server

Make sure that the authorization server meets the Yandex Dialogs requirements:

- Runs according to [RFC](https://tools.ietf.org/html/rfc6749).
- Processes required parameters, authenticates users, and generates an authorization `code`.
- After the user authenticates on the authorization server, the server redirects the OAuth app (the Alice app) to the URL: `https://social.yandex.net/broker/redirect` ([redirection endpoint](https://tools.ietf.org/html/rfc6749#section-3.1.2)). In the request parameters, the server passes an authorization `code` and other parameters.
- The URL used to get the token can identify the OAuth application and generate an OAuth token (optionally also a refresh token) for the authorization code passed.

    The response length is limited to 5000 characters, and the length of the OAuth token or refresh token to 2048 characters. Token lifetime (the `expires_in` property) must be an integer between 1 and 4,294,967,296.


Instead of your own authorization server, you can use the [Yandex ID API](https://yandex.ru/dev/id/) to authenticate Yandex users.

<!--<title>Если используете подход Single Sign On — предупреждайте пользователей</title><p>Если вы разрабатываете несколько навыков и используете технологию единого входа (<xref href="https://ru.wikipedia.org/wiki/Технология_единого_входа" format="html" scope="external">Single Sign On</xref>), следует явно предупредить об этом пользователей. В противном случае, такие навыки могут вызывать у пользователей недоумение.</p><p>Например, пользователь когда-то авторизовался в навыке <ph conref="../warehouse/concepts.dita#names/skill-name-tv"/>. Спустя какое-то время пользователь запустил другой навык <ph conref="../warehouse/concepts.dita#names/skill-name-balance"/> и запросил в нем свой баланс. Поскольку используется подход SSO, повторная аутентификация не потребуется и навык покажет пользователю баланс. Однако пользователь может не вспомнить, что ранее уже авторизовался в навыке «TV» — такое поведение навыка может его насторожить.</p><p>Информируйте своих пользователей о подобной ситуации — например, в описании к навыкам или в приветственной фразе.</p>-->

**Next step** → [Link accounts](https://yandex.ru/dev/dialogs/smart-home/doc/en/auth/add-skill-to-console.md)

### Useful links {#concept_xwr_b1g_s3b}

- [OAuth 2.0 specification](https://tools.ietf.org/html/rfc6749)

- [OAuth implementation in Yandex](https://yandex.ru/dev/id/doc/en/)


<!-- source: en/_includes/support-button.md -->
<!-- [![Support](../_images/support-image.svg)](../feedback.md)-->
<!-- endsource: en/_includes/support-button.md -->


