Appropriate steps for getting XPUB
Created by: pxsocs
I'm following the steps below but not being able to get XPUB information resulting in an error:
Cannot GET /xpub/xpub123456[...]
Steps taken:
-
Get authentication token from a POST request to: url:
http://[my_onion_address]/v2/auth/login
post_fields:{"apikey": [my_API_key]}
Result: Success with Json: {'authorizations': {'access_token': 'my_token', 'refresh_token': 'my_token'}} -
Use the access_token to send a POST request to add HD address: url:
http://[my_onion_address]/v2/xpub
post_fields:{"xpub": [my_xpub], "type": "new", "at": [my_at]}
Result: Success with Json: {"status": "ok"} -
Send a GET request to receive details of HD address: url:
http://[my_onion_address]/v2/xpub/[my_xpub]/info?at=[my_at]
Result: Fails - receive message back:Cannot GET /xpub/xpub123456[...]/info
Note:
By changing the GET url to:
http://[my_onion_address]/v2/support/xpub/[my_xpub]/info?at=[my_at]
An error json is returned:
{
"status": "error",
"error": "Your current access rights do not allow this operation"
}
I would believe I'm probably using the wrong url path for the GET request.