Getting started
Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
To integrate it into your application, you can use the JSON HTTP API or one of the Lago libraries (depending on your programing language or framework).
You must retrieve your API key from your account.
Configuration
- Curl
- Python
- Ruby
- Node.js
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/..." \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '...'
Install package with pip
pip install lago-python-client
Usage
from lago_python_client import Client
client = Client(api_key='__YOUR_API_KEY__')
Add the gem in your Gemfile
bundle add lago-ruby-client
Or if bundler is not being used to manage dependencies, install the gem by executing:
$ gem install lago-ruby-client
Usage
require 'lago-ruby-client'
client = Lago::Api::Client.new({api_key: '__YOUR_API_KEY__'})
Install package with npm
npm install lago-nodejs-client
Usage
import Client from 'lago-nodejs-client'
let client = new Client('__YOUR_API_KEY__')