LNPay Docs
Search…
How to Authenticate
You can authenticate via the LNPay.co API in multiple methods. This is provided so you can implement in whatever way is easiest for the device/platform you are working on. No particular method is preferred over the other at this point.
The docs use the HTTP Basic Authentication method

Get API Key

Login to https://lnpay.co and your API Key can be found here: https://lnpay.co/developers/dashboard

HTTP Header Authentication

X-Api-Key header can be used to authenticate
curl
1
$ curl -H "X-Api-Key: sak_XXXXXXX" \
2
https://api.lnpay.co/v1/wallets
Copied!

Query String Authentication

You can authenticate by passing the parameter access-token in the URL as a query string parameter.
curl
1
$ curl https://lnpay.co/v1/wallets?access-token=sak_XXXXXXX
Copied!

HTTP Basic Authentication

Basic authentication is also supported
curl
1
# NOTE: the colon below prevents curl from asking for password
2
3
$ curl -u sak_XXXXXXX: \
4
https://lnpay.co/v1/wallets
5
6
7
# NOTE: you must base64 encode sak_XXXXXXX: when using raw authentication header
8
9
$ curl -H 'Authorization: Basic cGFrX08waVVNeGs4a0tfcVV6a1Q0WUtGdnAxWnNVdHA6' \
10
https://lnpay.co/v1/wallets
Copied!
Last modified 3mo ago