App registration for authorization
Step 1. Creating an app
-
Sign in to Yandex OAuth with the Yandex account that you plan to use for app development.
Warning
To avoid losing access to your app, use an account you can always log in to. Make sure you can complete the verification process with this account.
-
If your service isn't verified, please complete verification. Otherwise, your app's users will see a warning before granting it access to their data. This significantly reduces successful authorization conversions in your app.
Tip
Verification is especially important for this type of app.
-
Create an app in one of the following ways:
-
Click Create app. In the pop-up window, select For user authorization.
-
-
Specify app data:
-
Fill in the Your service's name field and upload an icon.
The file size can't exceed 1 MB.
The user will see the service's name and icon on the authorization page and in the list of apps that have access to their account.
-
Enter your Contact email. Make sure it's valid so you don't miss important product updates.
-
Click Continue.
-
Step 2. App platforms
-
Select the platforms you're setting up authorization for:
- Web services
- iOS app
- Android application
-
Specify parameters of the platforms your app works on.
Web servicesiOS appAndroid applicationRedirect URI. The URL the user is sent to after they give the app permission to access their data.
For example, if you use the instant authorization technology (recommended for web services), enter the URL of the callback page you'll create to receive the token.
If you have an app ecosystem or use different environments, add extra Redirect URIs. You can select the appropriate address when you get the OAuth token.
The Redirect URI specified in the OAuth app doesn't have to match the one in the request exactly. The following URL components must match:
- Scheme
- Host
- Port (if any)
- Path
The following components may differ:
- Query
- Fragment
-
iOS AppId. The exact ID of the iOS app, for example
A1B2C3D4E5.com.domain.application. It consists of a Prefix and a Bundle ID. Learn more about iOS app IDs in the Apple documentation. -
iOS AppStore URL. Link to the app in the AppStore.
-
Android package name. The app package name (the
applicationIdfield in thebuild.gradlefile of your module). Read more about Android app IDs in Android documentation. -
Android Google Play URL. Link to the app in Google Play.
-
SHA256 Fingerprints. The certificate fingerprint of your app. Learn more about generating a fingerprint in the Android documentation.
Note
If you're developing an app for iOS or Android, use SDK Yandex ID to get an OAuth token.
Step 3. Data access
-
Select the user data your app needs to access. Apps typically request access to the following:
- Login, first name, last name, and gender.
- User's profile picture.
- Email address.
- Phone number.
- Date of birth.
You can select any other permissions as needed.
The user will see the list of requested data on the authorization page and in the list of apps that have access to their account.
Tip
Select only the data that your app will actually use.
-
Click Continue.
Completing registration
After setting up all the app's parameters, a window will appear in Yandex OAuth that users will see when logging in to your app via Yandex ID To confirm saving, click Everything is correct.
Further steps to connect to the API Yandex ID include:
- Getting an OAuth token.
- Entering user information.
To configure this, use the parameters listed on the app's page in your Yandex OAuth account.