To help developers use LNbits to manage their users, the User Manager
extension allows the creation and management of users and wallets.
For example, a games developer may be developing a game that needs
each user to have their own wallet, LNbits can be included in the
developers stack as the user and wallet manager.
Created by, Ben Arc
GET
/usermanager/api/v1/users
JSON list of users
curl -X GET {{ request.base_url }}usermanager/api/v1/users -H
"X-Api-Key: {{ user.wallets[0].adminkey }}"
GET
/usermanager/api/v1/users/<user_id>
{"id": <string>, "name": <string>, "admin":
<string>, "email": <string>, "password":
<string>}
curl -X GET {{ request.base_url
}}usermanager/api/v1/users/<user_id> -H "X-Api-Key: {{
user.wallets[0].inkey }}"
GET
/usermanager/api/v1/wallets
{"X-Api-Key": <string>}
JSON wallet data
curl -X GET {{ request.base_url }}usermanager/api/v1/wallets -H
"X-Api-Key: {{ user.wallets[0].adminkey }}"
GET
/usermanager/api/v1/transactions/<wallet_id>
{"X-Api-Key": <string>}
JSON a wallets transactions
curl -X GET {{ request.base_url
}}usermanager/api/v1/transactions/<wallet_id> -H "X-Api-Key: {{
user.wallets[0].inkey }}"
POST
/usermanager/api/v1/users
{"X-Api-Key": <string>, "Content-type":
"application/json"}
{"admin_id": <string>, "user_name": <string>,
"wallet_name": <string>,"email": <Optional string>
,"password": <Optional string>}
{"id": <string>, "name": <string>, "admin":
<string>, "email": <string>, "password":
<string>}
curl -X POST {{ request.base_url }}usermanager/api/v1/users -d
'{"admin_id": "{{ user.id }}", "wallet_name": <string>,
"user_name": <string>, "email": <Optional string>,
"password": < Optional string>}' -H "X-Api-Key: {{
user.wallets[0].inkey }}" -H "Content-type: application/json"
POST
/usermanager/api/v1/wallets
{"X-Api-Key": <string>, "Content-type":
"application/json"}
{"user_id": <string>, "wallet_name": <string>,
"admin_id": <string>}
{"id": <string>, "admin": <string>, "name":
<string>, "user": <string>, "adminkey": <string>,
"inkey": <string>}
curl -X POST {{ request.base_url }}usermanager/api/v1/wallets -d
'{"user_id": <string>, "wallet_name": <string>,
"admin_id": "{{ user.id }}"}' -H "X-Api-Key: {{ user.wallets[0].inkey
}}" -H "Content-type: application/json"
DELETE
/usermanager/api/v1/users/<user_id>
{"X-Api-Key": <string>}
curl -X DELETE {{ request.base_url
}}usermanager/api/v1/users/<user_id> -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
DELETE
/usermanager/api/v1/wallets/<wallet_id>
{"X-Api-Key": <string>}
curl -X DELETE {{ request.base_url
}}usermanager/api/v1/wallets/<wallet_id> -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
POST
/usermanager/api/v1/extensions
{"X-Api-Key": <string>}
curl -X POST {{ request.base_url
}}usermanager/api/v1/extensions?extension=withdraw&userid=user_id&active=true
-H "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type:
application/json"
{"extension": "updated"}