Informazioni sul ritiro dell'API SafetyNet Attestation
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
L'API SafetyNet Attestation è stata ritirata nel 2022 e disattivata completamente a gennaio 2025. Gli sviluppatori devono eseguire la migrazione all'API Play Integrity che riunisce diverse offerte di integrità (compreso l'esito relativo all'integrità di SafetyNet Attestation) in un'unica API.
Configurare l'app per l'utilizzo dell'API Play Integrity
Ti consigliamo di eseguire la migrazione all'API Play Integrity per evitare interruzioni nel rilevamento di interazioni rischiose con la tua app e per contrastare gli abusi.
Le due API sono concettualmente simili, quindi se hai già definito la tua strategia anti-abuso e utilizzavi SafetyNet Attestation, la migrazione è semplice. Ora puoi iniziare a configurare l'API Play Integrity utilizzando Play Console.
Ritiro completo dell'API SafetyNet Attestation
Se provi a chiamare l'API SafetyNet Attestation, riceverai un errore.
L'API attest restituisce un'attività che invoca sempre l'ascoltatore on
failure con un'ApiException e un
codice di stato pari a 7 (NETWORK_ERROR
). Se hai rilasciato una
versione della tua app che utilizza l'API Play Integrity, devi chiedere ai tuoi
utenti di aggiornare l'app.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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."]]