Reset User Codes

Remove all codes

Reset both access code and passcode if they were set.

This method can be prohibited if card.settings.isResettingUserCodesAllowed is set tofalse.


passcode <String> [optional] Passcode to set. If empty, user will be prompted to enter code before operation.

cardId <String> CID, Unique Tangem card ID number.

initialMessage <Message> [optional] This message will be shown in the NFC session dialog. Default: "Tap the card to your phone exactly as it shown above".


This command will return the SuccessResponse (click to see more) object in response.


let cardId = card.cardId

tangemSdk.resetUserCodes(cardId: cardId) { result in
    switch result {
    case .success:
        print("All user codes have been reset")
    case .failure(let error):

Last updated