newValues.BitFirst=true// ForceSendFields optional for value truenewValues.BitSecond=false// ForceSendFields required for value falsenewValues.BitThird=nil// do not set ForceSendFields for unspecified bitsnewValues.ForceSendFields=[]string{"BitSecond"}
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Detect repeat abuse using device recall (beta)\n\n| **Important:** Device recall is a new feature in Play Integrity API that is available in beta and subject to change. [Express interest](https://forms.gle/2d24B4gNyoVrqztG6) in joining the beta program.\n\nThis page describes how to use device recall to store and retrieve custom data\nwith specific devices. You can reliably recall the custom data again later when\nyour app is installed on the same device, even after the device is reset. This\nlets you detect and prevent a device from being re-used based on an action or\nbehavior that you specify, while preserving user privacy.\n\nHow does device recall work?\n----------------------------\n\nDevice recall gives apps the ability to store and recall custom data associated\nwith a specific device in a way that preserves user privacy. The data is stored\non Google's servers, allowing your app to reliably recall your custom data even\nafter your app is reinstalled or the device is reset. For example, you could use\nthe feature to recall devices where you found evidence of severe abuse,\ndevices that already redeemed high-value items (such as a free trial), or\ndevices that are being used repeatedly to create new accounts for abusive\npurposes. Device recall preserves user privacy because the requesting app can\nonly recall the limited data that it associated with devices, without accessing\nany device or user identifiers. After you turn on device recall, you can do the\nfollowing:\n\n- **Read per-device data** : You can read three custom values or *bits* for each device when you obtain an integrity verdict. You can define your own meaning to these values; for example, you can treat the values as three separate flags or you could combine them to represent eight custom labels.\n- **Modify per-device data**: After you obtain an integrity token, you can use that token to make a server-side call to Google Play's server to modify one or more of the values. You have up to 14 days to use the token. This lets you modify a value if, for example, abuse only becomes evident in the two week period after you first perform an integrity check. When you modify a value, the month and year when the modification was made is also stored.\n\nDevice recall prerequisites and considerations\n----------------------------------------------\n\nDevice recall may only be used to store and recall information to protect app\nsecurity and to mitigate abuse, fraud, and unauthorized access. You may not use\ndevice recall to fingerprint or track individual users or devices and you may\nnot use device recall to keep track of sensitive user or device characteristics\nlike gender, age, or location data.\n\nDevice recall has the following prerequisites:\n\n- Device recall can be used on phones, tablets, foldables, TV, Auto, and Wear OS. On Wear, device recall is only available on devices that ship with Wear OS 5 or higher. Device recall is not supported on emulators.\n- Device recall requires recent versions of both Google Play Store and Google Play services to be installed and enabled on the device.\n- Device recall requires the user account to be Play licensed, otherwise the verdict will be unevaluated.\n\nDevice recall has the following timing considerations:\n\n- After you verify an integrity token, you have up to 14 days to use it to store custom device recall data.\n- Device recall includes timestamps so that you can consider recently modified data as higher priority than data that was modified a long time ago. Consider ignoring or resetting the data after a long enough time period to take into account that devices can change hands or be refurbished and resold.\n- The recall bits for a device will be stored for 3 years after the last read or write access.\n- If you need to delete all data associated with a device, your app can reset all three values on that device to false. This will automatically reset the time stamps.\n\nFor developers with multiple apps and developers transferring apps, device\nrecall works as follows:\n\n- All the apps in your Google Play developer account have access to the same three values per device. In other words, if one of your apps modifies one of the values, then all of your apps will read the modified value when they're installed on the same device.\n- If an app is transferred from one developer account to another, device recall will reflect the new developer account's per-device data, not the old developer account's per-device data.\n\nTurn on device recall\n---------------------\n\n| **Note:** To turn on device recall, you must first complete the [device recall beta\n| interest form](https://forms.gle/2d24B4gNyoVrqztG6). Once approved, you will be able to turn on device recall in the Play Console.\n\nWhen you are ready, turn on device recall in the Play Console:\n\n1. Sign in to the Play Console.\n2. Select the app that will use device recall.\n3. In the **Release** section of the left menu, go to **App integrity**.\n4. Next to Play Integrity API, click **Settings**.\n5. In the Responses section of the page, click **Change responses**.\n6. Turn Device recall on.\n7. Click Save changes.\n\nWhen you turn on or off device recall, any [Play Integrity API test\nresponses](/google/play/integrity/additional-tools#test-different) that you've\nset up in the Play Console will be deleted and you will need to create them\nagain.\n\nRead device recall values\n-------------------------\n\nDevice recall works in both Play Integrity API classic and standard requests. In\nstandard requests, device recall is refreshed in the warmup call. In other\nwords, after you modify per-device data, you will need to perform another warm\nup to see the updated value. Once device recall is enabled, you will be able to\n[read device recall values](/google/play/integrity/verdicts#device-recall) in your integrity verdicts.\n\nModify device recall values\n---------------------------\n\nYou can modify device recall values by making a server-to-server API call\nsimilar to [decoding the integrity\nverdict](/google/play/integrity/classic#decrypt-verify-google-servers). Setting\na bit to `true` will also update its write date (even if it was already `true`).\nSetting a bit to `false` will reset its write date to empty. Any bits that are\nunspecified in a request will remain unchanged. There is a small propagation\ndelay between writing bits and being able to read them back in the verdict. This\ndelay can be as long as 30 seconds, though it is generally much shorter. Device\nrecall write requests should be less frequent than your integrity token\nrequests. They are not counted in your integrity token request quota but are\nsubject to non-public, defensive rate limits. \n\n```\nplayintegrity.googleapis.com/v1/PACKAGE_NAME/deviceRecall:write -d \\\n'{\n \"integrityToken\": \"INTEGRITY_TOKEN\",\n \"newValues\": {\n \"bitFirst\": true,\n \"bitThird\": false\n }\n}'\n```\n| **Note:** The integrity token should be validated during a user action (i.e. you should verify the nonce or request hash) and then used for writing recall bits. It will be valid for up to 14 days.\n\u003e **Tip:** If you are using the [Golang library for the Play Integrity API](https://pkg.go.dev/google.golang.org/api/playintegrity/v1), remember to add the field name to [ForceSendFields](https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields) when setting a bit value to false, as in the following snippet. \n\u003e\n\u003e newValues.BitFirst = true // ForceSendFields optional for value true\n\u003e newValues.BitSecond = false // ForceSendFields required for value false\n\u003e newValues.BitThird = nil // do not set ForceSendFields for unspecified bits\n\u003e newValues.ForceSendFields = []string{\"BitSecond\"}"]]