About
Yandex ID — is a single account to access all Yandex services. API Yandex ID allows you to authorize users on your website or mobile app using their Yandex account and via the OAuth 2.0 protocol.
API Yandex ID makes interaction with your website easier:
- Users can log in with their Yandex account. They don't have to create a new account and fill out additional forms.
- Developers can identify such users and use information from their Yandex accounts to personalize the app's content and interface. Permissions granted to each app are limited to those that were set when registering the app.
- You can use the instant authorization technology for a website or the SDK Yandex ID library for mobile devices to implement the login system.
See OAuth implementation at Yandex for information about the basic OAuth concepts and the features specific to Yandex.
How it works
-
The user logging in to your app selects to do so 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 grants access to their data:
-
The app obtains an OAuth token with permissions enabling it to access API Yandex ID. Then a request can be sent to API Yandex ID to retrieve the following user data:
- Username, first name, last name, and gender.
- User avatar.
- Email address.
- Phone number.
- Date of birth.
-
The app sends a request containing the obtained OAuth token to API Yandex ID and gets a unique user ID and this user's data.
-
The app completes the login process, using the settings and content associated with the ID it received. This way, a Yandex user gets an account in your app without creating it from scratch.