Layer 231
method
toncenter.performApiRequest#8d7bdd61 flags:# post:flags.0?true endpoint:string query:flags.1?string payload:flags.2?string = toncenter.ApiResponse;

Parameters

Name Type Description
Post flags.0?true If set, send a POST request with payload as the body; otherwise send a GET request
Endpoint string TON Center API endpoint (method) to call
Query flags.1?string URL-encoded query string with the endpoint's parameters
Payload flags.2?string JSON request body, for POST requests

Gogram Example

// GET request to a TON Center API endpoint, proxied through Telegram.
res, err := client.ToncenterPerformAPIRequest(false, "getAddressBalance",
	"address=EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N", "")
if err != nil {
	log.Fatal(err)
}
fmt.Println("response JSON:", res.Response.Data)