Layer 231
method
wallet.tonConnectCreateSession#cc931046 dapp_client_id:string manifest_url:string = TonConnectSession;

Parameters

Name Type Description
DappClientId string Client ID (public key) of the d App, from the id parameter of its TON Connect link
ManifestUrl string URL of the d App's tonconnect-manifest. json, from its connection request

Gogram Example

// Both values come from the dApp's tc:// link: "id" and the manifestUrl inside "r".
session, err := client.WalletTonConnectCreateSession(
	"230f1e4df32364888a5dbd92a410266fcb974b73e30ff3e546a654fc8ee2c953",
	"https://app.example.com/tonconnect-manifest.json",
)
if err != nil {
	log.Fatal(err)
}
fmt.Println("session", session.ID, "pending:", session.Pending)
if session.Manifest != nil {
	fmt.Println("dApp:", session.Manifest.Name)
}