l402_request
Requests an L402-protected URL, pays the returned Lightning invoice via LNbits, then retries with authorization to return the unlocked response.
Instructions
Run the full L402 flow: request a URL, detect the 402 challenge, pay the invoice via LNbits, retry with Authorization, and return the unlocked response.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "l402_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The L402-protected URL to request | |
| body | No | Optional request body for non-GET requests | |
| method | No | HTTP method to use (default: GET) | GET |
| headers | No | Optional request headers |