About the SafetyNet Attestation API deprecation
Stay organized with collections
Save and categorize content based on your preferences.
The SafetyNet Attestation API was deprecated in 2022 and fully turned down in
January 2025. Developers should migrate to the Play Integrity API that
consolidates multiple integrity offerings (including the SafetyNet Attestation
integrity verdict) under a single API.
Setting up your app to use the Play Integrity API
We recommend that you migrate to the Play Integrity API to avoid any disruptions
in detecting risky interactions with your app and fighting abuse.
The two APIs are conceptually similar, so if you've already defined your
anti-abuse strategy and were using SafetyNet Attestation, the migration is
straightforward. You can start to set up the Play Integrity API using your
Play Console now.
SafetyNet Attestation API full turndown
If you try to call the SafetyNet Attestation API, you will receive an error.
The attest API returns a task that always invokes the on
failure listener with an ApiException and a
status code of 7 (NETWORK_ERROR
). If you have released a
version of your app that uses the Play Integrity API, you should instruct your
users to update their app.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-08 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."]]