Why do we need private key to connect to TronGrid API?

I’m looking at the code to transfer tokens via TronGrid and it shows the below.

  const tronWeb = new TronWeb({
    fullHost: url,
    headers: { "TRON-PRO-API-KEY": AppKey },
    privateKey: privateKey,
  });

Is this the private key to my wallet?

12 Likes

yes, in case you need to sign txs

4 Likes

Ok, I’m assuming this is optional. Anyway, thank you for your reply.

4 Likes

Do you know how to use tron in react

1 Like

We are using tronweb and tronlink to connect our react frontend to Tron blockchain

1 Like

Ok. I have used metamask BTTC testnet in react project

1 Like

I am very interested to learn how you use tronlink in react frontend, I am trying to write an API in python to send tron usdt in very safe method offline and just broadcast it online

will appreciate if you give me more information

1 Like