Account Creation API Error

Get request to create an account:

http://23.228.67.85:7890/account/generate

returns:

{
“timeStamp”: 91187970,
“error”: “Unauthorized”,
“message”: “remote 137.78.99.23 attempted to call local /account/generate”,
“status”: 401
}

Could you please help me with this?

Is any authorization needed for account creation?

Node URL (23.228.67.85:7890) is selected by logic from:


connection.SetTestnet();
connection.AutoHost = true;

The api you are trying to use is only allowed on a local NIS since it involves a private key. You have to run your own local NIS to use it.

Thanks,

what API (or SDK) to use to be able to do it on Testnet and Mainnet?

Account generation API method call is only available for local nodes?

Yes.

You cannot create a new account via a GET request in the browser using a remote NIS.
If you use java you can use nem.core to create a new account, and for javascript there is nem-sdk for example.

1 Like

Thanks, ok.