GET /api/v3/lightning/routers/{lcuid}/credentials¶
Summary¶
GET /v3/lightning/routers/{lcuid}/credentials
Description¶
Decrypt and return the router's secret credentials. Every call is logged to the
lightning channel as router.credentials.revealed.
Tags: lightning
Parameters¶
Header Parameters¶
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization |
string |
✓ Yes | Bearer {AuthToken} |
|
Content-Type |
string |
✓ Yes | application/json |
|
Accept |
string |
✓ Yes | application/json |
|
AppIdV3 |
string |
✓ Yes | LCUID-LAP-********-****-****-****-************ |
Responses¶
Response: 200¶
Description: Sample Response
Content Type: application/json¶
Schema¶
Type: object
Properties:
success(boolean): truecredentials(object) Type:object
Properties:
admin_user(string): The router admin username.admin_password(string): The decrypted router admin password.wg_private_key(string): The decrypted WireGuard private key.sms_password(string): The decrypted SMS password (null if not set).
Example Response¶
{
"success": true,
"credentials": {
"admin_user": "admin",
"admin_password": "SUPERSECRET",
"wg_private_key": "PRIV",
"sms_password": "SMSPWD"
}
}
Example Implementations¶
Bash (cURL)¶
curl --request GET \
--url "https://api.lucit.app/api/v3/lightning/routers/{lcuid}/credentials" \
--header "Authorization: Bearer {AuthToken}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "AppIdV3: LCUID-LAP-********-****-****-****-************"
JavaScript (Fetch API)¶
const url = "https://api.lucit.app/api/v3/lightning/routers/{lcuid}/credentials";
const headers = {
"Authorization": "Bearer {AuthToken}",
"Content-Type": "application/json",
"Accept": "application/json",
"AppIdV3": "LCUID-LAP-********-****-****-****-************"
};
fetch(url, {
method: "GET",
headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
PHP (Guzzle)¶
<?php
require_once 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.lucit.app/api/v3/lightning/routers/{lcuid}/credentials', [
'headers' => [
'Authorization' => 'Bearer {AuthToken}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
]
]);
$body = $response->getBody();
$data = json_decode($body, true);
print_r($data);
Python (Requests)¶
import requests
import json
url = "https://api.lucit.app/api/v3/lightning/routers/{lcuid}/credentials"
headers = {
"Authorization": "Bearer {AuthToken}",
"Content-Type": "application/json",
"Accept": "application/json",
"AppIdV3": "LCUID-LAP-********-****-****-****-************"
}
response = requests.get(url, headers=headers)
print(response.json())