Informacje o wycofaniu SafetyNet Attestation API
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Interfejs SafetyNet Attestation API został wycofany w 2022 r., a w styczniu 2025 r. całkowicie wyłączony. Deweloperzy powinni przejść na interfejs Play Integrity API, który konsoliduje różne rozwiązania dotyczące integralności (w tym ocenę integralności SafetyNet Attestation) w jednym interfejsie API.
Konfigurowanie aplikacji pod kątem interfejsu Play Integrity API
Zalecamy przejście na interfejs Play Integrity API, aby uniknąć przerw w wykrywaniu ryzykownych interakcji z aplikacją i zwalczaniu nadużyć.
Oba interfejsy API są podobne pod względem koncepcji, więc jeśli masz już zdefiniowaną strategię przeciwdziałania nadużyciom i korzystasz z autentykacji SafetyNet, migracja jest prosta. Możesz już rozpocząć konfigurowanie interfejsu Play Integrity API za pomocą Konsoli Play.
Pełna odmowa w SafetyNet Attestation API
Jeśli spróbujesz wywołać interfejs SafetyNet Attestation API, pojawi się błąd.
Interfejs API attest zwraca zadanie, które zawsze wywołuje obsługę błędu z wyjątkiem ApiException i kodem stanu 7 (NETWORK_ERROR
). Jeśli masz opublikowaną wersję aplikacji, która korzysta z interfejsu Play Integrity API, poinformuj użytkowników, aby zaktualizowali aplikację.
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[],[],null,["# About the SafetyNet Attestation API deprecation\n\nThe SafetyNet Attestation API was deprecated in 2022 and fully turned down in\nJanuary 2025. Developers should migrate to the [Play Integrity API](/google/play/integrity) that\nconsolidates multiple integrity offerings (including the SafetyNet Attestation\nintegrity verdict) under a single API.\n\nSetting up your app to use the Play Integrity API\n-------------------------------------------------\n\nWe recommend that you migrate to the Play Integrity API to avoid any disruptions\nin detecting risky interactions with your app and fighting abuse.\n\nThe two APIs are conceptually similar, so if you've already defined your\nanti-abuse strategy and were using SafetyNet Attestation, the migration is\nstraightforward. You can [start to set up](/google/play/integrity/setup) the Play Integrity API using your\n[Play Console](https://play.google.com/console/u/0/developers) now.\n\nSafetyNet Attestation API full turndown\n---------------------------------------\n\nIf you try to call the SafetyNet Attestation API, you will receive an error.\nThe [attest](https://developers.google.com/android/reference/com/google/android/gms/safetynet/SafetyNetClient#public-tasksafetynetapi.attestationresponse-attest-byte%5B%5D-nonce,-string-apikey) API returns a task that always invokes the [on\nfailure listener](https://developers.google.com/android/reference/com/google/android/gms/tasks/Task#addOnFailureListener(com.google.android.gms.tasks.OnFailureListener)) with an [ApiException](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException) and a\n[status code](https://developers.google.com/android/reference/com/google/android/gms/common/api/ApiException#getStatusCode()) of 7 (`NETWORK_ERROR`). If you have released a\nversion of your app that uses the Play Integrity API, you should instruct your\nusers to update their app."]]