0

I'm trying to test the APIs I've found on eosflare because I need to find some blocks and transactions information for my thesis.

I was wondering if I could retrieve the data without downloading cleos with a simple API Request. I think the API url is someway correct because I get this response when I test it:

r = requests.get('https://api.eosflare.io/v1/eosflare/get_account/')
print(r.status_code)
print(r.headers['content-type'])
print(r.encoding)
print(r.text)
200
application/json; charset=utf-8
utf-8
{"err_code":10,"err_msg":"Error: ($.account: undefined) ✖ (required: true)"}

But when I try to add an account name to solve the previous error, I always get a Not Found response:

r = requests.get('https://api.eosflare.io/v1/eosflare/get_account/yupcreators1')
print(r.status_code)
print(r.headers['content-type'])
print(r.encoding)
print(r.text)
404
text/plain; charset=utf-8
utf-8
Not Found

Thanks in advance for any type of help.

1

Please see the documentation here:

https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index#operation/get_account

You must send the account name in POST request (not a GET)

{"account_name": "nameofaccount"}

Example:

curl -d '{"account_name": "hackerdarwin"}' http://api.eosn.io/v1/chain/get_account
1
  • Thank you so much. I was able to get information about an account. I'm now having prolems with the get_actions method, I'll make a new question if needed I guess. – Matteo Pinna Feb 27 at 0:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.