Skip to content
CCPEDIAby Unity Nodes
App Development

How to fetch ledgerId in JAVA application

2 posts381 views6 likesLast activity Nov 2020

  1. lubnavOP 3

    I have created a middleware application in java to interact with DAML ledger deployed on Sandbox. So to generate the jwt token in the java application, how can I get the ledgerId?

  2. cocreature 3

    Hi @lubnav, welcome to the forum!

    To get the ledger id, you can use the getLedgerId method on DamlLedgerClient after you have connected. The Java quickstart guide includes an example of how you can setup the connection