# Error message when requesting from API

**URL:** <https://radixtalk.com/t/error-message-when-requesting-from-api/451>\
**Category:** Developers\
**Created:** [13 April 2022 19:32 UTC](https://radixtalk.com/t/error-message-when-requesting-from-api/451 "2022-04-13T19:32:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newworld](https://radixtalk.com/user_avatar/radixtalk.com/newworld/32/335_2.png) [@newworld](https://radixtalk.com/u/newworld)\
**Post date:** [13 April 2022 19:32 UTC](https://radixtalk.com/t/error-message-when-requesting-from-api/451/1 "2022-04-13T19:32:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Peachy](https://radixtalk.com/user_avatar/radixtalk.com/peachy/32/343_2.png) [@Peachy](https://radixtalk.com/u/Peachy)\
**Post date:** [13 April 2022 19:58 UTC](https://radixtalk.com/t/error-message-when-requesting-from-api/451/2 "2022-04-13T19:58:58Z")

</div>

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

 ![image](https://radixtalk.com/uploads/default/original/1X/201f73c1b9a69dac4f7e118f3a45a6533cfaf0f9.png)

---

<div class="post-metadata">

**Author:** ![newworld](https://radixtalk.com/user_avatar/radixtalk.com/newworld/32/335_2.png) [@newworld](https://radixtalk.com/u/newworld)\
**Post date:** [13 April 2022 20:33 UTC](https://radixtalk.com/t/error-message-when-requesting-from-api/451/3 "2022-04-13T20:33:28Z")

</div>

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())
