Layer 231
method
wallet.tonConnectClaimRequest#66b57b41 flags:# declined:flags.1?true session_id:long msg_id:int app_request_id:string challenge_answer:flags.0?bytes = Bool;

Parameters

Name Type Description
Declined flags.1?true If set, decline the request instead of claiming it
SessionId long ID of the TON Connect session the request belongs to
MsgId int ID of the pending request, from wallet. ton Connect Get Pending
AppRequestId string ID the d App assigned to the request (the id of its JSON-RPC message)
ChallengeAnswer flags.0?bytes Answer to the session challenge, proving possession of the session key

Returns

Bool

Gogram Example

// Claim a pending dApp request (req, from wallet.tonConnectGetPending) before answering it.
// appRequestID is the "id" of the decrypted JSON-RPC request.
ok, err := client.WalletTonConnectClaimRequest(&tg.WalletTonConnectClaimRequestParams{
	SessionID:    req.SessionID,
	MsgID:        req.MsgID,
	AppRequestID: appRequestID,
})
if err != nil {
	log.Fatal(err)
}
fmt.Println("request claimed:", ok)
// Set Declined: true to reject it instead.