Closed bitkarrot closed 7 months ago
Wait, does the API only work if there is a channel open?
Hi, try this:
curl -u :<password> http://.../getinfo
Le dim. 24 mars 2024, 07:37, Bitkarrot @.***> a écrit :
Wait, does the API only work if there is a channel open?
— Reply to this email directly, view it on GitHub https://github.com/ACINQ/phoenixd/issues/4#issuecomment-2016711434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPPFPVC5KIU5OIY7TIX4VTYZZYBRAVCNFSM6AAAAABFFM3GR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWG4YTCNBTGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
ok thanks. @pm47
nah I think @bitkarrot wanted to report the issue with the createinvoice api call instead: doculink here.
When running the command, it returns nothing...and it should return the following as described in the doc, but it doesn't:
{
"amountSat": 100,
"paymentHash": "f419207c9edde9021ebfb6bd0df6bd0a6606ecaf935357cc2f362e30835c3765",
"serialized": "lntb1u1pjlsjnqpp57svjqly7mh5sy84lk67sma4apfnqdm90jdf40np0xchrpq6uxajscqpjsp592kp0fs2ssgpq9h54tsfaj5w34287v8fezgaw6cr56f076c05glq9q7sqqqqqqqqqqqqqqqqqqqsqqqqqysgqdq6d4ujqenfwfehggrfdemx76trv5mqz9grzjqwfn3p9278ttzzpe0e00uhyxhned3j5d9acqak5emwfpflp8z2cnflcyamh4dcuhwqqqqqlgqqqqqeqqjqnjpjvnv0p3wvwc6vhzkkgm8kl9r837x4p9qupk5ln5tqlm7prrlsy5xd8cf5agae64f53dvm9el0z5hvgcnta4stgmrg7zwfah0nqrqph4ts8l"
}
Let me know if I'm wrong. The getinfo returns something, just no channels mentioned.
The doc should be simplified to:
curl -X POST -u :<password> -d 'description=my first invoice' -d 'amountSat=100' http://127.0.0.1:9740/createinvoice
In general, If the auth isn't working there should be an appropriate error message returned instead of nothing.
Are the docs in a separate repo? Can we make PRs against it?
Thanks in advance. @pm47
The documentation page on the website has been updated, it should be easier to use now. Closing this issue, feel free to re-open if you still have problems.
In general, If the auth isn't working there should be an appropriate error message returned instead of nothing.
Fixed in 4aa7f73
Are the docs in a separate repo? Can we make PRs against it?
Not currently, might change in the future
@pm47 @dpad85
I would still like to see a working example using the headers, if possible as I'm working on an integration with it right now
According to the documentation when attempting to access the API, with this example, and replacing the key in the example below/.phoenix/phoenix.conf),
OjgxZWEy...2RlZmI=
with the Password for the http api from the config file -> (default: reads from /Users/There is no response returned on the command line when entering the password from phoenix.conf
Are we supposed to modify the authorization password somewhere before passing it into following curl command?
Please advise if we are using the command incorrectly or if we should be using the authorization key from somewhere else.
Thanks in advance.