//Enable KYC flag on accountTokenGrantKycTransaction transaction =newTokenGrantKycTransaction().setAccountId(accountId).setTokenId(tokenId);//Freeze the unsigned transaction, sign with the kyc private key of the token, submit the transaction to a Hedera networkTransactionResponse txResponse =transaction.freezeWith(client).sign(kycKey).execute(client);//Request the receipt of the transactionTransactionReceipt receipt =txResponse.getReceipt(client);//Obtain the transaction consensus statusStatus transactionStatus =receipt.status;System.out.println("The transaction consensus status is "+transactionStatus);//v2.0.1
//Enable KYC flag on account and freeze the transaction for manual signingconsttransaction=awaitnewTokenGrantKycTransaction().setAccountId(accountId).setTokenId(tokenId).freezeWith(client);//Sign with the kyc private key of the tokenconstsignTx=awaittransaction.sign(kycKey);//Submit the transaction to a Hedera network consttxResponse=awaitsignTx.execute(client);//Request the receipt of the transactionconstreceipt=awaittxResponse.getReceipt(client);//Get the transaction consensus statusconsttransactionStatus=receipt.status;console.log("The transaction consensus status "+transactionStatus.toString());//v2.0.5
//Enable KYC flag on account and freeze the transaction for manual signingtransaction, err = hedera.NewTokenGrantKycTransaction().SetAccountID(accountId).SetTokenID(tokenId).FreezeWith(client)if err !=nil {panic(err)}//Sign with the kyc private key of the token, submit the transaction to a Hedera networktxResponse, err := transaction.Sign(kycKey).Execute(client)if err !=nil {panic(err)}//Request the receipt of the transactionreceipt, err = txResponse.GetReceipt(client)if err !=nil {panic(err)}//Get the transaction consensus statusstatus := receipt.Statusfmt.Printf("The transaction consensus status is %v\n", status)//v2.1.0