Hello. This is Klaytn API Service team.
Please refer to the following information about how to delete a wallet key.
An account and a wallet key cannot be deleted at the same time. Therefore, a key deletion API is required to delete the wallet key separately. There are two ways to delete your wallet key. The first method is to check your KRN through the console page to delete your key, and the second method is to check KRN by making an API to do so. Please refer to the below for the second key deletion method.
1. To make API calls, set basic Authorization in your preferred tool. Login by using Access Key ID (Username) and Secret Access key (Password) that you were given during your Credential process on the Console website.
(Please refer to the Authorization Setup guidelines page about how to create a KAS API Authorization key.)
2. Click KAS Wallet API Docs
3. Click Key and click Retrieve a list of keys. Then, you’ll see that krn (KAS resource name) and
x-chain-id are required to deactivate an account. X-chain-id is already given. Therefore, you’ll just
need to find the KRN.
4. Go to Query Resource List API Docs.
5. You’ll see that an account-id is required to find KRN.
6. To find Account ID, go to KAS Console page and login into KAS.
7. Click the name at the top right of the page.
8. Click User Information.
9. Check your Account ID.
10. Go back to the docs again and copy the URL right next to GET.
11. Delete the curly brackets in the URL and put the address you checked in the Console page in the deleted part. Then continue forward to put it in your preferred tool.
12. Then, put x-chain-id (1001 or 8217) and the Account ID in Header parameters.
13. For Query parameter, put wallet in service-id. Also, put account pool or key-pool in resource-type.
14. Check the KRN that has your intended key deletion in responses.
15. Go back to the Retrieve a list of keys docs again and copy the URL right next to GET.
16. Paste the URL in your preferred tool and then put the KRN in Query parameter.
17. Put x-chain-id (1001 or 8217) in Header parameters.
18. Please refer to the sample API responses when a request succeeds.
19. After making an API call, check the responses to get a list of keys. Then, check the Key ID that has
your intended key deletion.
20. Click KAS Wallet API Docs
21. Click Key and then click Key Deletion.
22. You’ll see that key-id and x-chain-id are required to delete a key.
23. Copy the URL right next to Delete and continue forward to put it in your preferred tool.
24. Delete the curly brackets in the URL and put the Key ID in the deleted part.
25. You can see the response samples of key deletion status in the document.
26. After making the API call, you’ll see that in the responses, the key is officially deleted.
27. You can see the reduced number of Wallet Keys on Dashboard on the Console website.