I use the code that the Tron api generates and get a 200 response code ('ok'), but I don't get any information about the balances.
Code
import requests
#wallet = 'TWMsYUtqEAPxs7ZXuANkpABqGcixK3XZJD'
url = "https://api.trongrid.io/v1/contracts/TWMsYUtqEAPxs7ZXuANkpABqGcixK3XZJD/tokens"
headers = {"accept": "application/json"}
response = requests.get(url, headers=headers)
print(response.text)
Response
{
"data": [],
"meta": {
"at": 1676483294906,
"page_size": 0
},
"success": true
}