> For the complete documentation index, see [llms.txt](https://guides.getalby.com/developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.getalby.com/developer-guide/developer-guide/alby-wallet-api/lightning-address-details-proxy.md).

# ⚡ Lightning Address Details Proxy

* Many lightning addresses don't support CORS, which means fetching the data directly in a browser environment will not always work.
* Two requests are required to retrieve LNURLp and Keysend data for a lightning address. The proxy will do these for you with a single request.

{% hint style="info" %}
This doesn't require any authorization and is separate from the OAuth Clients
{% endhint %}

**Endpoints**

* Get Info `https://api.getalby.com/lnurl/lightning-address-details`&#x20;
* Request Invoice `https://api.getalby.com/lnurl/generate-invoice`

## Get Info

Returns the passed lightning address' LNURLp, Keysend and Nostr information.

<mark style="color:blue;">`GET`</mark> `https://api.getalby.com/lnurl/lightning-address-details`

Returns the Lightning Address' LNURLp, Keysend and Nostr information.

#### Query Parameters

| Name                                 | Type   | Description       |
| ------------------------------------ | ------ | ----------------- |
| ln<mark style="color:red;">\*</mark> | String | lightning address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "lnurlp": {
    "allowsNostr": true,
    "callback": "https://getalby.com/lnurlp/hello/callback",
    "commentAllowed": 255,
    "maxSendable": 11000000000,
    "metadata": "[[\"text/identifier\",\"hello@getalby.com\"],[\"text/plain\",\"Sats for Alby\"]]",
    "minSendable": 1000,
    "nostrPubkey": "79f00d3f5a19ec806189fcab03c1be4ff81d18ee4f653c88fac41fe03570f432",
    "payerData": {
      "email": {
        "mandatory": false
      },
      "name": {
        "mandatory": false
      },
      "pubkey": {
        "mandatory": false
      }
    },
    "status": "OK",
    "tag": "payRequest"
  },
  "keysend": {
    "customData": [
      {
        "customKey": "696969",
        "customValue": "017rsl75kNnSke4mMHYE"
      }
    ],
    "pubkey": "030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3",
    "status": "OK",
    "tag": "keysend"
  },
  "nostr": {
    "names": {
      "hello": "4657dfe8965be8980a93072bcfb5e59a65124406db0f819215ee78ba47934b3e"
    }
  }
}
```

{% endtab %}

{% tab title="400: Bad Request Invalid lightning address" %}

```javascript
{
  "lnurlp": null,
  "keysend": null,
  "nostr": null
}
```

{% endtab %}
{% endtabs %}

## Request Invoice

Creates a new invoice to receive lightning payments.

<mark style="color:blue;">`GET`</mark> `https://api.getalby.com/lnurl/generate-invoice`

Creates a new invoice to receive lightning payments.\
\
Please refer to [https://github.com/lnurl/luds](https://github.com/getAlby/lightning-address-details-proxy/blob/master/LUDs) (LUD-06, LUD-12, LUD-18) and any other LUD that extends the functionality of LUD-06 for more information on what parameters can be passed.

#### Query Parameters

| Name                                     | Type   | Description           |
| ---------------------------------------- | ------ | --------------------- |
| ln<mark style="color:red;">\*</mark>     | String | lightning address     |
| amount<mark style="color:red;">\*</mark> | String | amount (in millisats) |
| comment                                  | String | HTTP encoded comment  |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "invoice": {
    "pr": "lnbc10n1pj3u40ypp5uajs7ec28gdw6n0d5c8h7f9khnwsdhkvl95p5d2h89z9japgwlqshp50kncf9zk35xg4lxewt4974ry6mudygsztsz8qn3ar8pn3mtpe50scqzzsxqyz5vqsp50vmc02nhzdxnswh2hfyhyaau6ckj9zetdd0szhyvl5dan3mpcaes9qyyssqem3vggz969swqzml964wcppuj3m4zuth57t9j8c5j2k2pnreukpjhh70r8g6r3n3zyks0udyll8ccklj04f2f4mgkare6ph05rwvxdgq6rl2e7",
    "routes": [],
    "status": "OK",
    "successAction": {
      "message": "Thanks, sats received!",
      "tag": "message"
    },
    "verify": "https://getalby.com/lnurlp/hello/verify/SZ5P8D4rHjKXKczAiLW8ZaWZ"
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guides.getalby.com/developer-guide/developer-guide/alby-wallet-api/lightning-address-details-proxy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
