1# @ohos.identifier.oaid (OAID) (System API) 2 3 4The **OAID** module provides APIs for obtaining and resetting Open Anonymous Device Identifiers (OAIDs). 5 6 7> **NOTE** 8> 9> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. 10> 11> To use the APIs for obtaining OAIDs, you must [request the ohos.permission.APP_TRACKING_CONSENT permission](../../security/AccessToken/request-user-authorization.md). 12> This topic describes only system APIs provided by the module. For details about its public APIs, see [@ohos.identifier.oaid (OAID)](js-apis-oaid.md). 13 14 15## Modules to Import 16 17``` 18import identifier from '@ohos.identifier.oaid'; 19``` 20 21## identifier.resetOAID 22 23resetOAID(): void 24 25Resets an OAID. 26 27**System API**: This is a system API. 28 29**System capability**: SystemCapability.Advertising.OAID 30 31**Error codes** 32 33For details about the following error codes, see [OAID Error Codes](errorcode-oaid.md). 34 35| ID | Error Message | 36| -------- | -------- | 37| 202 | Permission verification failed. A non-system application calls a system API. | 38| 17300001 | System internal error. | 39| 17300002 | Not in the trust list. | 40 41**Example** 42``` 43import identifier from '@ohos.identifier.oaid'; 44import hilog from '@ohos.hilog'; 45 46try { 47 identifier.resetOAID(); 48} catch (err) { 49 hilog.error(0x0000, 'testTag', '%{public}s', `reset oaid catch error: ${err.code} ${err.message}`); 50} 51``` 52