---
title: "Get started with the Hedera Token Service – Part 1"
id: "16145"
type: "post"
slug: "get-started-with-the-hedera-token-service-part-1"
published_at: "2020-12-07T20:09:00+00:00"
modified_at: "2025-12-10T04:54:53+00:00"
url: "https://hedera.com/blog/get-started-with-the-hedera-token-service-part-1/"
markdown_url: "https://hedera.com/blog/get-started-with-the-hedera-token-service-part-1.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. Let’s take a look at why you’d..."
taxonomy_category:
  - "Uncategorized"
taxonomy_post_tag:
  - "technical"
---

[Skip to content](#content)
blog

# Get started with the Hedera Token Service – Part 1

December 7, 2020

![Hedera Team](/wp-content/uploads/2025/12/HH-logo-Black.jpg)

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 1: How to Mint NFTs](https://www.hedera.com/blog/get-started-with-the-hedera-token-service-part-1-how-to-mint-nfts)**

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. Tokens are as fast, fair, and secure as hbar and cost a fraction of 1¢ USD to transfer.

Let’s take a look at why you’d consider using it versus something like a fungible token with a smart contract on the Ethereum Blockchain, and the different types of functionalities that are available within the Hedera API (HAPI):

With HTS, it’s incredibly easy to create a new token that can represent anything from a stablecoin pegged to the USD value, or an in-game reward system.

Note: while most of the following examples are in JavaScript (v2.0.7), official SDKs supporting [Go](https://docs.hedera.com/hedera/sdks-and-apis/sdks/tokens/define-a-token)
 and [Java](https://docs.hedera.com/hedera/sdks-and-apis/sdks/tokens/define-a-token)
 are also available and implemented very similarly, alongside community-supported SDKs in [.NET](https://hedera.com/blog/creating-tokens-hedera-net-part-1)
 and various other frameworks and/or languages.

#### Create a Token

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

Create token

Create token

```
//Create a token
const transaction = await new TokenCreateTransaction()
 .setTokenName("Your Token Name")

 .setTokenSymbol("F")

 .setTreasuryAccountId(treasuryAccountId)

 .setInitialSupply(5000)

 .setAdminKey(adminPublicKey)

 .freezeWith(client);

//Sign the transaction with the token adminKey and the token treasury account private key

const signTx = await (await transaction.sign(adminKey)).sign(treasuryKey);

//Sign the transaction with the client operator private key and submit to a Hedera network

const txResponse = await signTx.execute(client);

 

//Get the receipt of the the transaction

const receipt = await txResponse.getReceipt(client);

//Get the token ID from the receipt

const tokenId = receipt.tokenId;

console.log("The new token ID is " + tokenId);
```

To show how similar the Hedera Token Service is to use in any of our supported SDKs, here is the same example but in Java.

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

Java Example

Java Example

```
//Create the transaction
TokenCreateTransaction transaction = new TokenCreateTransaction()
 .setTokenName("Your Token Name")
 .setTokenSymbol("F")
 .setTreasuryAccountId(treasuryAccountId)
 .setInitialSupply(5000)
 .setAdminKey(adminKey.getPublicKey());

//Build the unsigned transaction, sign with admin private key of the token, sign with the token treasury private key, submit the transaction to a Hedera network
TransactionResponse txResponse = transaction.freezeWith(client).sign(adminKey).sign(treasuryKey).execute(client);

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

//Get the token ID from the receipt
TokenId tokenId = receipt.tokenId;
System.out.println("The new token ID is " + tokenId);
```

And here is the same relevant code example for the Go SDK.

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

Go example

Go example

```
//Create the transaction and freeze the unsigned transaction
tokenCreateTransaction, err := hedera.NewTokenCreateTransaction().
	 SetTokenName("Your Token Name").
		SetTokenSymbol("F").
		SetTreasuryAccountID(treasuryAccountId).
		SetInitialSupply(1000).
		SetAdminKey(adminKey).
		FreezeWith(client)
if err != nil {
	panic(err)
}

//Sign with the admin private key of the token, sign with the token treasury private key, sign with the client operator private key and submit the transaction to a Hedera network
txResponse, err := tokenCreateTransaction.Sign(adminKey).Sign(treasuryKey).Execute(client)
if err != nil {
	panic(err)
}

//Request the receipt of the transaction
receipt, err := txResponse.GetReceipt(client)
if err != nil {
	panic(err)
}

//Get the token ID from the receipt
tokenId := *receipt.TokenID
fmt.Printf("The new token ID is %vn", tokenId)
```

#### Token Associations

Before another account can receive or send this specific token ID, they have to become “associated” with it — this helps reduce unwanted spam, potential tax liability, or other concerns from users that don’t want to be associated with any of the variety of tokens that will be created on HTS.

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

Token Associations

Token Associations

```
//Associate a token to an account and freeze the unsigned transaction for signing
const transaction = await new TokenAssociateTransaction()

 .setAccountId(accountId)

 .setTokenIds([tokenId])

 .freezeWith(client);

//Sign with the private key of the account that is being associated to a token 

const signTx = await transaction.sign(accountKey);

//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());
```

#### Transferring tokens

Transferring these newly created tokens between accounts, after the token has been created and both accounts are associated with the new token ID, is almost easier.

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

Transferring tokens

Transferrong tokens

```
//Create the transfer transaction
const transaction = await new TransferTransaction()

 .addTokenTransfer(tokenId, accountId1, -10)

 .addTokenTransfer(tokenId, accountId2, 10)

 .freezeWith(client);

//Sign with the sender account private key

const signTx = await transaction.sign(accountKey1);

 

//Sign with the client operator private key and submit 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 " +transactionStatus.toString());
```

Integrating HTS is incredibly easy, within just a few lines of code in your favorite programming language you can create, associate, and transfer tokens. Please continue reading onto [Part 2](https://hedera.com/blog/get-started-with-the-hedera-token-service-part-2)
 of this HTS introduction in order to learn more about the administration functionalities provided by HAPI, and in [Part 3](https://hedera.com/blog/get-started-with-the-hedera-token-service-part-3)
 we will discuss other compliance mechanisms like KYC compliance.

[Back to Blog](/blog)

discover

See more articles

[View All](/blog)

![Image](https://hedera.com/wp-content/uploads/2026/08/Regulation_Blog-1024x576.png)

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/)

![Deploy Multichain Dapps](https://hedera.com/wp-content/uploads/2026/07/HH600301_DeployMultichainDapps_Final-1024x576.png)

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/)

![Regulation is finding its form](https://hedera.com/wp-content/uploads/2026/07/Regulation_Blog-1-1024x576.png)

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
