# Getting Contract Id inside the contract

**URL:** <https://forum.canton.network/t/getting-contract-id-inside-the-contract/4781>\
**Category:** App Development\
**Created:** [June 23, 2022, 8:12am UTC](https://forum.canton.network/t/getting-contract-id-inside-the-contract/4781 "2022-06-23T08:12:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frankie](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/frankie/32/646_2.png) [@Frankie](https://forum.canton.network/u/Frankie)\
**Post date:** [June 23, 2022, 8:12am UTC](https://forum.canton.network/t/getting-contract-id-inside-the-contract/4781/1 "2022-06-23T08:12:09Z")

</div>

Hi there, Just curious if contract Id can be accessed inside the contract, e.g. I’m writing a choice which creates a new contract. I want to pass the contract Id to the create contract so that the new one can fetch and access the data inside this contract. Is it possible?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [June 23, 2022, 8:13am UTC](https://forum.canton.network/t/getting-contract-id-inside-the-contract/4781/2 "2022-06-23T08:13:15Z")

</div>

You can use [self](https://docs.daml.com/2.3.0-snapshot.20220619.10104.0.253b0b18/daml/reference/templates.html#this-and-self) to get access to the contract id of the contract.
