eos icon indicating copy to clipboard operation
eos copied to clipboard

How to execute get-account command from browser?

Open gxkaur opened this issue 8 years ago • 14 comments

I'm unable to get the expected result when trying to execute the following command. curl http://myHost:myPort/v1/chain/get_account -X POST -d '{"name":"inita"}' Refer

I am using Postman to execute post requests.

Expected Output: image

Actual Output: image

Need Help!

gxkaur avatar Dec 06 '17 11:12 gxkaur

use "account_name"

nanonano7 avatar Dec 06 '17 12:12 nanonano7

@nanonano7 I got this in response :/ image

gxkaur avatar Dec 06 '17 12:12 gxkaur

try http://testnet1.eos.io:80/v1/chain/get_account if that works then your local eosd node is probably not set up correctly

nanonano7 avatar Dec 06 '17 13:12 nanonano7

@nanonano7 I ran this in my browser and got same error. image

gxkaur avatar Dec 06 '17 13:12 gxkaur

you have post JSON to it

nanonano7 avatar Dec 06 '17 13:12 nanonano7

@nanonano7 For http://testnet1.eos.io:80/v1/chain/get_account i have tried both ways - with and without params. In both cases i got same error. I am attaching the screen shot where I added params.

image Response: image

gxkaur avatar Dec 06 '17 14:12 gxkaur

use {"account_name":"inita"} not name

nanonano7 avatar Dec 06 '17 14:12 nanonano7

Omg! Thanks a lot! It Worked! 💃

gxkaur avatar Dec 06 '17 14:12 gxkaur

Thanks @nanonano7.

heifner avatar Dec 06 '17 14:12 heifner

@Gagan0436 Please use telegram EOS Single Threaded or EOS Developers for questions/support. We want to keep GitHub issues as clean as possible.

heifner avatar Dec 06 '17 14:12 heifner

@heifner Sure. Thank you for sharing. :)

gxkaur avatar Dec 08 '17 07:12 gxkaur

@nanonano7 Hi can you please have a look into this issue Any help will be appreciated! Thanks!

gxkaur avatar Dec 15 '17 11:12 gxkaur

how did you get account_name inita?

what api is used to create account_name? Account_Name or wallet names are different?

i tried get_account API with wallet name but it gives me this error.

i posted this json {"account_name":"test-wallet99"}

{ "code": 500, "message": "Internal Service Error", "error": { "code": 3010001, "name": "name_type_exception", "what": "Invalid name", "details": [ { "message": "Name not properly normalized (name: test-wallet99, normalized: test.wallet) ", "file": "name.cpp", "line_number": 15, "method": "set" } ] } }

gittempo avatar Jul 29 '18 11:07 gittempo

gittempo, EOS has "regulations" regarding naming account names: "Name should be less than 13 characters and only contains the following symbol .12345abcdefghijklmnopqrstuvwxyz."

Hope this helps

razliveyatan avatar Aug 17 '18 10:08 razliveyatan