Error message when requesting from API

Hey - if I want to get data form the following Radix API (in this case the account balances) I get the following error message:

{“code”:400,“message”:“One or more validation errors occurred”,“details”:{“validation_errors”:[{“path”:“”,“errors”:[“A non-empty request body is required.”]}],“type”:“InvalidRequestError”},“trace_id”:“00-994592adc1ef158cee927af48dea2cd0-73e5700a464dfe5f-00”}

this is the request:

import requests

headers={‘Content-Type’:‘application/json’}

query = {“network_identifier”: {“network”: “mainnet”}, “account_identifier”: {“address”: “<MY_ADDRESS>”}}

r = requests.post(‘<NOT_ALLOWED_TO_POST_LINK>’, params=query, headers=headers)

print(r.text)

I’m very new to this topic - maybe someone can help me.
BRGDS

I use Postman and merely populate it as follows (both Header and Body/raw/json)

3 Likes

Alright got it:

import requests
import json

headers={‘Content-Type’:‘application/json’, ‘X-Radixdlt-target-Gw-Api’:‘1.1.2’}

query = {“network_identifier”: {“network”: “mainnet”}, “account_identifier”: {“address”: “”}}

r = requests.post(‘’, headers=headers, data=json.dumps(query))

print(r.json())

2 Likes