---
title: "Get started with the Hedera Token Service – Part 3"
id: "16141"
type: "post"
slug: "get-started-with-the-hedera-token-service-part-3"
published_at: "2020-12-07T20:11:00+00:00"
modified_at: "2025-12-10T04:54:50+00:00"
url: "https://hedera.com/blog/get-started-with-the-hedera-token-service-part-3/"
markdown_url: "https://hedera.com/blog/get-started-with-the-hedera-token-service-part-3.md"
excerpt: "The Hedera Token Service (HTS) is used via a robust set of APIs for the configuration, minting, and management of tokens on Hedera, without needing to set up and deploy a smart contract. In Part 3 of this series, let's..."
taxonomy_category:
  - "Uncategorized"
taxonomy_post_tag:
  - "technical"
---

[Skip to content](#content)
blog

# Get started with the Hedera Token Service – Part 3

December 7, 2020

Hedera

Hedera provides secure, scalable infrastructure for real-world decentralized applications in finance, AI, and sustainability, governed by global enterprises.

**This blog post has been updated to include the latest capabilities of the Hedera Token Service.**

****See the updated version:**[Get started with the Hedera Token Service – Part 3: How to Pause, Freeze, Wipe, and Delete NFTs](https://hedera.com/blog/get-started-with-the-hedera-token-service-part-3-how-to-pause-freeze-wipe-and-delete-nfts)**

In part 3 of getting started with HTS we’re going to discuss some of the various regulatory and application compliance functionalities. Similar to [controlled mutability](https://hedera.com/blog/code-is-law-but-what-if-the-law-needs-to-change)
 with Hedera’s supporting services, HTS leaves decisions about these API parameters to the developers and provides ultimate flexibility to however someone would like to create their tokens.

#### KYC Key

If you want, you can also have more access controls around your tokens. To ensure that tokens only remain within parties that have been “authorized” to have them, e.g. known registered users, those who have passed identity verification, or otherwise, you can set what is called the “kyc” key for a particular token upon creation. These can be actual identity and compliance features, like AML requirements, or this can be used to reference any type of off-ledger authentication mechanism, like if a user has signed up for your application.

#### Enable KYC on a particular account

set kyc

set kyc

```
//Enable KYC flag on account and freeze the transaction for manual signing

const transaction = await new TokenGrantKycTransaction()

 .setAccountId(accountId)

 .setTokenId(tokenId)

 .freezeWith(client);

//Sign with the kyc private key of the token

const signTx = await transaction.sign(kycKey);

//Submit the transaction to a Hedera network 

const txResponse = await signTx.execute(client);

//Request the receipt of the transaction

const receipt = await txResponse.getReceipt(client);

 

//Get the transaction consensus status

const transactionStatus = receipt.status;

console.log("The transaction consensus status " +transactionStatus.toString());
```

After the account’s KYC flag has been set to true, the administrator, identity provider, or compliance manager is able to revoke or disable the KYC flag. After their KYC has been disabled, this means that the account will no longer be able to receive or send tokens that require KYC.

#### Disable KYC on a particular account

disable kyc

disable kyc

```
//Remove the KYC flag on account and freeze the transaction for signing
const transaction = await new TokenRevokeKycTransaction()

 .setAccountId(accountId)

 .setTokenId(tokenId)

 .freezeWith(client);

//Sign with the kyc private key of the token

const signTx = await transaction.sign(kycKey);

//Submit the transaction to a Hedera network 

const txResponse = await signTx.execute(client);

//Request the receipt of the transaction

const receipt = await txResponse.getReceipt(client);

 

//Get the transaction consensus status

const transactionStatus = receipt.status;

console.log("The transaction consensus status " +transactionStatus.toString());
```

#### Freezing accounts

Within enterprise and real world applications, there are circumstances and use cases that require accounts to be potentially frozen. This means that their account won’t be able to transact in a specific HTS token type, but would not affect their other interactions on the Hedera network, like transacting in HBAR. Just like the other controlled mutability on the network that is available with the rest of HTS’ admin and compliance functionality, if left undefined, there is no ability to freeze accounts.

Freezing

freezing

```
//Freeze an account from transferring a token
const transaction = await new TokenFreezeTransaction()
 .setAccountId(accountId)
 .setTokenId(tokenId)
 .freezeWith(client);

//Sign with the freeze key of the token 
const signTx = await transaction.sign(freezeKey);

//Submit the transaction to a Hedera network 
const txResponse = await signTx.execute(client);

//Request the receipt of the transaction
const receipt = await txResponse.getReceipt(client);
 
//Get the transaction consensus status
const transactionStatus = receipt.status;
console.log("The transaction consensus status " +transactionStatus.toString());
```

unfreezing

unfreezing

```
//Unfreeze an account
const transaction = await new TokenUnfreezeTransaction()
 .setAccountId(accountId)
 .setTokenId(tokenId)
 .freezeWith(client);

//Sign with the freeze private key of the token 
const signTx = await transaction.sign(freezeKey);

//Submit the transaction to a Hedera network
const txResponse = await signTx.execute(client);

//Request the receipt of the transaction
const receipt = await txResponse.getReceipt(client);

//Obtain the transaction consensus status
const transactionStatus = receipt8.status;
console.log("The transaction consensus status is " +transactionStatus.toString());
```

#### Wiping tokens

Similar to freezing accounts for a particular token, there are a number of circumstances in which tokens need to be removed from a particular account or accounts, for example, if a business needed to issue a refund or found fraudulent activity. If tokens are created with a wipe key, then compliance and administrators are able to “wipe” and remove tokens from a particular account balance. This would result in the tokens being effectively “burned” and the total supply of that token decreased by the account’s balance or the amount that was specified to wipe.

wipe

wipe

```
//Wipe 100 tokens from an account and freeze the unsigned transaction for manual signing
const transaction = await new TokenWipeTransaction()

 .setAccountId(accountId)

 .setTokenId(tokenId)

 .setAmount(100)

 .freezeWith(client);

//Sign with the private key of the account that is being wiped, sign with the wipe private key of the token

const signTx = await (await transaction.sign(accountKey)).sign(wipeKey); 

//Submit the transaction to a Hedera network 

const txResponse = await signTx.execute(client);

//Request the receipt of the transaction

const receipt = await txResponse.getReceipt(client);

//Obtain the transaction consensus status

const transactionStatus = receipt.status;

console.log("The transaction consensus status is " +transactionStatus.toString());
```

With the Hedera Token Service, application developers at startups and enterprises can issue and configure tokens with ease. And with various types of regulatory compliance functionality — from account KYC to approve / deny lists, to freezing, and clawbacks — there are tons of out of the box options that expand on the current offerings available on alternative public distributed ledgers in the market today.

If you’ve started the process of building your application and are looking for technical help, transaction fee stipends, and marketing promotion, learn more and register for a [grant](https://hedera.com/grants)
. And if you’d like to join the technical discussion about HTS, join the [#hedera-token-service](https://discord.gg/rHjB3rU)
 channel in the [official Hedera Discord](https://hedera.com/discord)
.

We can’t wait to see what future you’ll build!

[Back to Blog](/blog)

discover

See more articles

[View All](/blog)

August 5, 2026

### Details decide. What digital asset policy did in July 2026

Halfway through 2026, the regulatory picture is coming into focus. Hedera Chief Policy Officer Nilmini Rubin and VP Global Policy Isadora Arredondo break down what moved in June across the

[Read More](https://hedera.com/blog/details-decide-what-digital-asset-policy-did-in-july-2026/)

July 17, 2026

### Deploy Multichain Dapps on Hedera in 60 Seconds with scaffold-hbar

Deploying multichain dapps on Hedera has never been easier! With just one command, you can spin up a fully functional dapp using Next.js, Hardhat or Foundry, and AI agent context…

[Read More](https://hedera.com/blog/deploy-multichain-dapps-on-hedera-in-60-seconds-with-scaffold-hbar/)

July 13, 2026

### Regulation is finding its form in summer 2026

Halfway through 2026, the regulatory picture is coming into focus. Hedera Chief Policy Officer Nilmini Rubin and VP Global Policy Isadora Arredondo break down what moved in June across the

[Read More](https://hedera.com/blog/regulation-is-finding-its-form-in-summer-2026/)

## Ready to get started?

Discover why Hedera is the trusted institutional-grade network powering the new digital economy.

[Start Building](/start-building)

[Contact](/contact)

We use cookies to deliver the best experience on our website and to analyze traffic. By continuing to use this site, you consent to our cookie policy.

Review our [Privacy Policy](/privacy)
 to understand how Hedera collects and uses information.

Accept All CookiesAccept Necessary Cookies
