Yandex ID is a single Yandex account. Using API Yandex ID, you can set up user authorization via the OAuth 2.0 protocol on your website or in your mobile app.
API Yandex ID makes interaction with your website easier:
- Users can authorize with their Yandex account. They won't have to create a new account and fill out additional forms.
- Developers will be able to identify the user and use information from their Yandex account to personalize the app's content and interface. Access to each app is explicitly restricted by the rights set when registering the app.
- You can implement login using the instant authorization technology or thebutton on the website page.
For the basic principles of OAuth and the protocol features in Yandex, see OAuth implementation at Yandex.
How it works
When authorizing in your app, the user chooses logging in with their Yandex account:
The app linked to API Yandex ID redirects the user to Yandex OAuth and requests access to their Yandex account data. The user confirms logging in with their Yandex account and allows access to their data:
The app receives an OAuth token with access to API Yandex ID. Using API Yandex ID, the app requests the following user data:
- Login, first name, last name, and gender.
- User's profile picture.
- Email address.
- Phone number.
- Date of birth.
The app sends a request to API Yandex ID specifying the OAuth token it received and gets the unique user ID and their data.
The app authorizes the user using the settings and content linked to the ID it received. This way, Yandex users get an account in your app without creating a new account.