{"id":16012,"date":"2021-11-03T12:00:00","date_gmt":"2021-11-03T12:00:00","guid":{"rendered":"https:\/\/hederav2stg.wpenginepowered.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/"},"modified":"2025-12-09T17:09:42","modified_gmt":"2025-12-09T17:09:42","slug":"get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions","status":"publish","type":"post","link":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/","title":{"rendered":"Get Started with the Hedera Token Service &#8211; Part 2: KYC, Update, and Scheduled Transactions"},"content":{"rendered":"<div class=\"body-text BodyCopy mb-40 style-1\">\n<p>In <a href=\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-1-how-to-mint-nfts\" target=\"_blank\">Part 1<\/a> of the series, you saw how to mint and transfer an NFT using the Hedera Token Service (HTS). Now, in Part 2, you will see how to take advantage of the flexibility you get when you create and configure your tokens with HTS. More specifically, you will learn how to: <\/p>\n<ul>\n<li>Enable and disable a KYC flag for a token (KYC stands for \u201cknow your customer\u201d)<\/li>\n<\/ul>\n<ul>\n<li>Update token properties (only possible if it\u2019s a mutable token. Hint: AdminKey)<\/li>\n<\/ul>\n<ul>\n<li>Schedule transactions (like a token transfer)<\/li>\n<\/ul>\n<figure><iframe allowfullscreen=\"\" frameborder=\"0\" src=\"\/\/www.youtube.com\/embed\/sxs53OLnF48\" style=\"width: 500px; height: 281px;\"><\/iframe><\/figure>\n<p><strong>Note<\/strong>: To make sure you have everything you need to follow along, be sure to check out these <a href=\"https:\/\/docs.hedera.com\/hedera\/getting-started\/create-and-fund-your-hedera-testnet-account\" target=\"_blank\">getting started resources<\/a>. There, you will see how to create a Hedera testnet account, and then you can configure your development environment. If you want the entire code used, skip to the <a href=\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions#:~:text=the%20tokenization%20industry!-,Code%20Check,-https\">Code Check<\/a> section below.<\/p>\n<h4 class=\"color-ultraviolet\">Understanding KYC and Hedera Tokens<\/h4>\n<h4 class=\"color-ultraviolet\">KYC Key<\/h4>\n<p>When you <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/sdks\/tokens\/define-a-token\" target=\"_blank\">create a token<\/a> with HTS, you can optionally use the <em><strong>.setKycKey(&lt;key&gt;)<\/strong><\/em> method to enable this <em><strong>&lt;key&gt;<\/strong><\/em> to grant (or revoke) KYC status of other accounts so they can transact with your token. You would consider using the KYC flag when you need your token to be used only within parties that have been \u201cauthorized\u201d to use it. For instance, known registered users, or those who have passed identity verification. Think of this as identity and compliance features like: anti-money laundering (AML) requirements, or any type of off-ledger authentication mechanism, like if a user has signed up for your application.<\/p>\n<p>The <em><strong>.setKycKey(&lt;key&gt;)<\/strong><\/em> method is not required when you create your token, so if you don\u2019t use the method that means anyone who is <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/sdks\/tokens\/associate-tokens-to-an-account\" target=\"_blank\">associated with your token<\/a> can transact without having to be \u201cauthorized\u201d. No KYC key also means that KYC grant or revoke operations are not possible for the token in the future.<\/p>\n<h4 class=\"color-ultraviolet\">Enable Token KYC on an Account<\/h4>\n<p>We will continue with the NFT example from <a href=\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-1-how-to-mint-nfts\" target=\"_blank\">Part 1<\/a>. However, we have to create a new token using <strong><em>.setKycKey(&lt;key&gt;)<\/em><\/strong>. Before users can transfer the newly created token, we must grant KYC to those users, namely Alice and Bob.<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ ENABLE TOKEN KYC FOR ALICE AND BOB\n    let aliceKyc = await kycEnableFcn(aliceId);\n    let bobKyc = await kycEnableFcn(bobId);\n    console.log(`- Enabling token KYC for Alice's account: ${aliceKyc.status}`);\n    console.log(`- Enabling token KYC for Bob's account: ${bobKyc.status}n`);\n<\/code><\/pre>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ KYC ENABLE FUNCTION ==========================================\n    async function kycEnableFcn(id) {\n        let kycEnableTx = await new TokenGrantKycTransaction()\n            .setAccountId(id)\n            .setTokenId(tokenId)\n            .freezeWith(client)\n            .sign(kycKey);\n        let kycSubmitTx = await kycEnableTx.execute(client);\n        let kycRx = await kycSubmitTx.getReceipt(client);\n        return kycRx;\n    }\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p><strong>Console output:<\/strong><\/p>\n<\/div>\n<figure class=\"blog-image mb-40\"><img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-1.jpg\" alt=\"\"\/><\/figure>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<h4 class=\"color-ultraviolet\">Disable Token KYC on an Account<\/h4>\n<p>After the KYC flag has been set to true for a user, the administrator, identity provider, or compliance manager can revoke or disable the KYC flag. After KYC is disabled for a user, he or she can longer receive or send that token. Here\u2019s sample code for disabling token KYC on Alice\u2019s account:<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ DISABLE TOKEN KYC FOR ALICE\n    let kycDisableTx = await new TokenRevokeKycTransaction()\n        .setAccountId(aliceId)\n        .setTokenId(tokenId)\n        .freezeWith(client)\n        .sign(kycKey);\n    let kycDisableSubmitTx = await kycDisableTx.execute(client);\n    let kycDisableRx = await kycDisableSubmitTx.getReceipt(client);\n    console.log(`- Disabling token KYC for Alice's account: ${kycDisableRx.status} n`);\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p><strong>Console output:<\/strong><\/p>\n<\/div>\n<figure class=\"blog-image mb-40\"><img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-2.jpg\" alt=\"\"\/><\/figure>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p><strong>Note<\/strong>: The following sections require that Alice has token KYC enabled.<\/p>\n<h4 class=\"color-ultraviolet\">Updating tokens<\/h4>\n<p>If you create a token using the <strong><em>.setAdminKey(&lt;key&gt;)<\/em><\/strong> method, then you can \u201cupdate\u201d that token, meaning change its metadata and characteristics. For instance, you can change the token name, symbol, or the keys that are associated with its <a href=\"https:\/\/hedera.com\/blog\/code-is-law-but-what-if-the-law-needs-to-change\" target=\"_blank\">controlled mutability<\/a>. You could create a token that initially has a 1 of 1 key for minting and burning, and over time, change this to a <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/sdks\/keys\/create-a-threshold-key\" target=\"_blank\">threshold<\/a> or multi-signature key. You can rotate the keys associated with compliance and administration or even remove them entirely, offering a more decentralized approach over time.<\/p>\n<p>On the other hand, if you create a token without using <strong><em>.setAdminKey(&lt;key&gt;)<\/em><\/strong>, then that token is immutable and its properties cannot be modified.<\/p>\n<p>In our example, we start by checking the initial KYC key for the token, then we update the KYC key from <strong><em>&lt;kycKey&gt;<\/em><\/strong> to <strong><em>&lt;newKycKey&gt;<\/em><\/strong>, and then we query the token again to make sure the key change took place.<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ QUERY TO CHECK INITIAL KYC KEY\n    var tokenInfo = await tQueryFcn();\n    console.log(`- KYC key for the NFT is: n${tokenInfo.kycKey.toString()} n`);\n\n    \/\/ UPDATE TOKEN PROPERTIES: NEW KYC KEY\n    let tokenUpdateTx = await new TokenUpdateTransaction()\n        .setTokenId(tokenId)\n        .setKycKey(newKycKey)\n        .freezeWith(client)\n        .sign(adminKey);\n    let tokenUpdateSubmitTx = await tokenUpdateTx.execute(client);\n    let tokenUpdateRx = await tokenUpdateSubmitTx.getReceipt(client);\n    console.log(`- Token update transaction (new KYC key): ${tokenUpdateRx.status} n`);\n\n    \/\/ QUERY TO CHECK CHANGE IN KYC KEY\n    var tokenInfo = await tQueryFcn();\n    console.log(`- KYC key for the NFT is: n${tokenInfo.kycKey.toString()}`);\n<\/code><\/pre>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ TOKEN QUERY FUNCTION ==========================================\n    async function tQueryFcn() {\n        var tokenInfo = await new TokenInfoQuery().setTokenId(tokenId).execute(client);\n        return tokenInfo;\n    }\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p><strong>Console output:<\/strong><\/p>\n<\/div>\n<figure class=\"blog-image mb-40\"><img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-3.jpg\" alt=\"\"\/><\/figure>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<h4 class=\"color-ultraviolet\">Schedule Transactions<\/h4>\n<p>Scheduled transactions enable you to collect the required signatures for a transaction in preparation for its execution. This can be useful if you don\u2019t have all the required signatures for the network to immediately process the transaction. Currently you can schedule: <strong><em>TransferTransaction()<\/em><\/strong> (for hbar and HTS tokens), <strong><em>TokenMintTransaction()<\/em><\/strong>, <strong><em>TokenBurnTransaction()<\/em><\/strong>, and <strong><em>TopicMessageSubmitTransaction()<\/em><\/strong>. More transactions are supported with new releases.<\/p>\n<p>Now, we will schedule a token transfer from Bob to Alice using <a href=\"https:\/\/docs.hedera.com\/hedera\/core-concepts\/scheduled-transaction\" target=\"_blank\">scheduled transactions<\/a>. This token transfer requires signatures from both parties. <\/p>\n<p>Given that we don\u2019t have Alice\u2019s and Bob\u2019s signatures immediately available (for the purposes of this example), we first create the NFT transfer without signatures. Then, we <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/sdks\/schedule-transaction\/create-a-schedule-transaction\" target=\"_blank\">create the scheduled transaction<\/a> using the constructor <strong><em>ScheduleCreateTransaction()<\/em><\/strong>, and specify the NFT transfer as the transaction to schedule using the <strong><em>.setScheduledTransaction()<\/em><\/strong> method.<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ CREATE THE NFT TRANSFER FROM BOB->ALICE TO BE SCHEDULED\n    \/\/ REQUIRES ALICE'S AND BOB'S SIGNATURES\n    let txToSchedule = new TransferTransaction()\n        .addNftTransfer(tokenId, 2, bobId, aliceId)\n        .addHbarTransfer(aliceId, -200)\n        .addHbarTransfer(bobId, 200);\n\n    \/\/ SCHEDULE THE NFT TRANSFER TRANSACTION CREATED IN THE LAST STEP\n    let scheduleTx = await new ScheduleCreateTransaction().setScheduledTransaction(txToSchedule).execute(client);\n    let scheduleRx = await scheduleTx.getReceipt(client);\n    let scheduleId = scheduleRx.scheduleId;\n    let scheduledTxId = scheduleRx.scheduledTransactionId;\n    console.log(`- The schedule ID is: ${scheduleId}`);\n    console.log(`- The scheduled transaction ID is: ${scheduledTxId} n`);\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p><strong>Console output:<\/strong><\/p>\n<\/div>\n<figure class=\"blog-image mb-40\"><img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-4.jpg\" alt=\"\"\/><\/figure>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p>The token transfer is now scheduled, and it will be executed as soon as all required signatures are submitted. Note that the scheduled transaction IDs (<strong><em>scheduledTxId<\/em><\/strong> in this case) have a \u201cscheduled\u201d flag that you can use to confirm the status of the transaction.<\/p>\n<p>As of the time of this writing, a schedule transaction has 30 minutes to collect all the required signatures before it can be executed or it expires (deleted from the network). If you set an <strong><em>&lt;AdminKey&gt;<\/em><\/strong> for the schedule transaction, then you can delete it before its execution or expiration. <\/p>\n<p>Now, we <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/sdks\/schedule-transaction\/sign-a-schedule-transaction\" target=\"_blank\">submit the required signatures<\/a> and <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/sdks\/schedule-transaction\/get-schedule-info\" target=\"_blank\">get schedule information<\/a> to check the status of our transfer.<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ SUBMIT ALICE'S SIGNATURE FOR THE TRANSFER TRANSACTION\n    let aliceSignTx = await new ScheduleSignTransaction().setScheduleId(scheduleId).freezeWith(client).sign(aliceKey);\n    let aliceSignSubmit = await aliceSignTx.execute(client);\n    let aliceSignRx = await aliceSignSubmit.getReceipt(client);\n    console.log(`- Status of Alice's signature submission: ${aliceSignRx.status}`);\n\n    \/\/ QUERY TO CONFIRM IF THE SCHEDULE WAS TRIGGERED (SIGNATURES HAVE BEEN ADDED)\n    scheduleQuery = await new ScheduleInfoQuery().setScheduleId(scheduleId).execute(client);\n    console.log(`- Schedule triggered (all required signatures received): ${scheduleQuery.executed !== null}`);\n\n    \/\/ SUBMIT BOB'S SIGNATURE FOR THE TRANSFER TRANSACTION\n    let bobSignTx = await new ScheduleSignTransaction().setScheduleId(scheduleId).freezeWith(client).sign(bobKey);\n    let bobSignSubmit = await bobSignTx.execute(client);\n    let bobSignRx = await bobSignSubmit.getReceipt(client);\n    console.log(`- Status of Bob's signature submission: ${bobSignRx.status}`);\n\n    \/\/ QUERY TO CONFIRM IF THE SCHEDULE WAS TRIGGERED (SIGNATURES HAVE BEEN ADDED)\n    scheduleQuery = await new ScheduleInfoQuery().setScheduleId(scheduleId).execute(client);\n    console.log(`- Schedule triggered (all required signatures received): ${scheduleQuery.executed !== null} n`);\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p><strong>Console output:<\/strong><\/p>\n<\/div>\n<figure class=\"blog-image mb-40\"><img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-5.jpg\" alt=\"\"\/><\/figure>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p>The scheduled transaction was executed. It is still a good idea to verify that the transfer happened as we expected, so we check all the balances once more to confirm. <\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ VERIFY THAT THE SCHEDULED TRANSACTION (TOKEN TRANSFER) EXECUTED\n    oB = await bCheckerFcn(treasuryId);\n    aB = await bCheckerFcn(aliceId);\n    bB = await bCheckerFcn(bobId);\n    console.log(`- Treasury balance: ${oB[0]} NFTs of ID: ${tokenId} and ${oB[1]}`);\n    console.log(`- Alice balance: ${aB[0]} NFTs of ID: ${tokenId} and ${aB[1]}`);\n    console.log(`- Bob balance: ${bB[0]} NFTs of ID: ${tokenId} and ${bB[1]}`);\n<\/code><\/pre>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">    \/\/ BALANCE CHECKER FUNCTION ==========================================\n    async function bCheckerFcn(id) {\n        balanceCheckTx = await new AccountBalanceQuery().setAccountId(id).execute(client);\n        return [balanceCheckTx.tokens._map.get(tokenId.toString()), balanceCheckTx.hbars];\n    }\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p><strong>Console output:<\/strong><\/p>\n<\/div>\n<figure class=\"blog-image mb-40\"><img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-6-scaled.jpg\" alt=\"\"\/><\/figure>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<h4 class=\"color-ultraviolet\">Conclusion<\/h4>\n<p>In this article, you saw examples of the flexibility you get when you create and configure your tokens with HTS &#8211; in a transparent and cryptographically provable way. Take advantage of this flexibility to tackle entirely new opportunities in the tokenization industry!<\/p>\n<h4 class=\"color-ultraviolet\">Code Check<\/h4>\n<p><a href=\"https:\/\/github.com\/hedera-dev\/hedera-example-hts-nft-blog-p1-p2-p3\/blob\/main\/nft-part2.js\" target=\"_blank\">https:\/\/github.com\/hedera-dev\/hedera-example-hts-nft-blog-p1-p2-p3\/blob\/main\/nft-part2.js<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to take advantage of the flexibility you get when you create and configure your tokens with HTS. More specifically, you will enable and disable a KYC flag for a token, update token properties, and schedule transactions (like a token transfer).<\/p>\n","protected":false},"author":10,"featured_media":17429,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[1],"tags":[45],"ppma_author":[43],"class_list":["post-16012","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-technical"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Get Started with the Hedera Token Service - Part 2: KYC, Update, and Scheduled Transactions | Hedera<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get Started with the Hedera Token Service - Part 2: KYC, Update, and Scheduled Transactions | Hedera\" \/>\n<meta property=\"og:description\" content=\"Learn how to take advantage of the flexibility you get when you create and configure your tokens with HTS. More specifically, you will enable and disable a KYC flag for a token, update token properties, and schedule transactions (like a token transfer).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/\" \/>\n<meta property=\"og:site_name\" content=\"Hedera\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-03T12:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-09T17:09:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Hedera Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/\"},\"author\":{\"name\":\"Hedera Team\",\"@id\":\"https:\/\/hedera.com\/#\/schema\/person\/2dc6146f9f20a44d3de58c834d52e9f4\"},\"headline\":\"Get Started with the Hedera Token Service &#8211; Part 2: KYC, Update, and Scheduled Transactions\",\"datePublished\":\"2021-11-03T12:00:00+00:00\",\"dateModified\":\"2025-12-09T17:09:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/\"},\"wordCount\":950,\"publisher\":{\"@id\":\"https:\/\/hedera.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg\",\"keywords\":[\"technical\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/\",\"url\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/\",\"name\":\"Get Started with the Hedera Token Service - Part 2: KYC, Update, and Scheduled Transactions | Hedera\",\"isPartOf\":{\"@id\":\"https:\/\/hedera.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg\",\"datePublished\":\"2021-11-03T12:00:00+00:00\",\"dateModified\":\"2025-12-09T17:09:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage\",\"url\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg\",\"contentUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg\",\"width\":2560,\"height\":1440},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hedera.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Started with the Hedera Token Service &#8211; Part 2: KYC, Update, and Scheduled Transactions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hedera.com\/#website\",\"url\":\"https:\/\/hedera.com\/\",\"name\":\"Hedera\",\"description\":\"Hello future\",\"publisher\":{\"@id\":\"https:\/\/hedera.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hedera.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hedera.com\/#organization\",\"name\":\"Hedera\",\"url\":\"https:\/\/hedera.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hedera.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png\",\"contentUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png\",\"width\":500,\"height\":375,\"caption\":\"Hedera\"},\"image\":{\"@id\":\"https:\/\/hedera.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get Started with the Hedera Token Service - Part 2: KYC, Update, and Scheduled Transactions | Hedera","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/","og_locale":"en_US","og_type":"article","og_title":"Get Started with the Hedera Token Service - Part 2: KYC, Update, and Scheduled Transactions | Hedera","og_description":"Learn how to take advantage of the flexibility you get when you create and configure your tokens with HTS. More specifically, you will enable and disable a KYC flag for a token, update token properties, and schedule transactions (like a token transfer).","og_url":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/","og_site_name":"Hedera","article_published_time":"2021-11-03T12:00:00+00:00","article_modified_time":"2025-12-09T17:09:42+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg","type":"image\/jpeg"}],"author":"Hedera Team","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#article","isPartOf":{"@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/"},"author":{"name":"Hedera Team","@id":"https:\/\/hedera.com\/#\/schema\/person\/2dc6146f9f20a44d3de58c834d52e9f4"},"headline":"Get Started with the Hedera Token Service &#8211; Part 2: KYC, Update, and Scheduled Transactions","datePublished":"2021-11-03T12:00:00+00:00","dateModified":"2025-12-09T17:09:42+00:00","mainEntityOfPage":{"@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/"},"wordCount":950,"publisher":{"@id":"https:\/\/hedera.com\/#organization"},"image":{"@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage"},"thumbnailUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg","keywords":["technical"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/","url":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/","name":"Get Started with the Hedera Token Service - Part 2: KYC, Update, and Scheduled Transactions | Hedera","isPartOf":{"@id":"https:\/\/hedera.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage"},"image":{"@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage"},"thumbnailUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg","datePublished":"2021-11-03T12:00:00+00:00","dateModified":"2025-12-09T17:09:42+00:00","breadcrumb":{"@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#primaryimage","url":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg","contentUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-scaled.jpg","width":2560,"height":1440},{"@type":"BreadcrumbList","@id":"https:\/\/hedera.com\/blog\/get-started-with-the-hedera-token-service-part-2-kyc-update-and-scheduled-transactions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hedera.com\/"},{"@type":"ListItem","position":2,"name":"Get Started with the Hedera Token Service &#8211; Part 2: KYC, Update, and Scheduled Transactions"}]},{"@type":"WebSite","@id":"https:\/\/hedera.com\/#website","url":"https:\/\/hedera.com\/","name":"Hedera","description":"Hello future","publisher":{"@id":"https:\/\/hedera.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hedera.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hedera.com\/#organization","name":"Hedera","url":"https:\/\/hedera.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hedera.com\/#\/schema\/logo\/image\/","url":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png","contentUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png","width":500,"height":375,"caption":"Hedera"},"image":{"@id":"https:\/\/hedera.com\/#\/schema\/logo\/image\/"}}]}},"featured_image_src":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-600x400.jpg","featured_image_src_square":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/2021-11-Blog-Updates-Get-started-with-the-Hedera-Token-Service-P2-Image-0-Thumbnail-1-600x600.jpg","author_info":{"display_name":"Hedera Team","author_link":"https:\/\/hedera.com\/blog\/author\/hedera-team\/"},"authors":[{"term_id":43,"user_id":10,"is_guest":0,"slug":"hedera-team","display_name":"Hedera Team","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/7ed01931dc9498365746508c4ca49ed0507ef65e04e0b82ffe88c50ef9242b1d?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":""}],"_links":{"self":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/posts\/16012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/comments?post=16012"}],"version-history":[{"count":0,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/posts\/16012\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/media\/17429"}],"wp:attachment":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/media?parent=16012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/categories?post=16012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/tags?post=16012"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/ppma_author?post=16012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}