Authentication
Secure your API requests with bearer token authentication
Plus Plan Feature
API Access
The LunaNotes API is available on our premium plans. Upgrade to Plus to get your API key and start building integrations.
Rate Limiting
API requests are limited to 30 requests per second per API key. Exceeding this limit will result in a 429 status code.
Authentication Method
All API requests must include your API key in the Authorization header using the Bearer authentication scheme.
Header Format
Authorization: Bearer YOUR_API_KEYHeader Details
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer YOUR_API_KEY | required |
Code Examples
curl https://api.lunanotes.com/v1/notes \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('https://api.lunanotes.com/v1/notes', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.get('https://api.lunanotes.com/v1/notes', headers=headers)
data = response.json()<?php
$ch = curl_init('https://api.lunanotes.com/v1/notes');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);package main
import (
"net/http"
"io/ioutil"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.lunanotes.com/v1/notes", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
}Security Best Practices
- • Never expose your API key in client-side code or public repositories
- • Store API keys securely using environment variables
- • Rotate your API keys regularly
- • Use HTTPS for all API requests
Next Steps
Ready to start making API requests? Explore our available endpoints.
