Authentication
curl --request GET \
--url https://api.lobstr.io/v1/me \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/me"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/me")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyGetting Started
Authentication
Learn how to authenticate your API requests using token-based authentication
GET
/
v1
/
me
Authentication
curl --request GET \
--url https://api.lobstr.io/v1/me \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/me"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/me")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyAll requests to the lobstr.io API must include an
Once authenticated, you’ll have access to all API endpoints based on your account’s permission level and subscription plan.
Authorization header with your API token. You can obtain your API token from the API menu in your dashboard.
The authentication format follows the standard Token authentication scheme:
Authorization: Token YOUR_API_KEY
Headers
string
required
Your API authentication token from the dashboard. Value:
Token YOUR_API_KEYStore your API key in environment variables rather than hardcoding it in your source code. This prevents accidental exposure in version control systems.
Never share your API key publicly or commit it to public repositories. Treat it like a password.
If you believe your API key has been compromised, regenerate it immediately from your dashboard. The old key will be invalidated.
Code Examples
curl -X GET "https://api.lobstr.io/v1/me" \
-H "Authorization: Token YOUR_API_KEY"
import requests
headers = {
"Authorization": "Token YOUR_API_KEY",
}
response = requests.get(
"https://api.lobstr.io/v1/me",
headers=headers
)
print(response.json())
Response
A successful call confirms your token is valid and returns your profile. See Get User Profile for the full response schema.200
{
"first_name": "John",
"last_name": "Doe",
"email": "user@example.com",
"email_verified": true,
"plan": [],
"login_count": 42,
"profile_image": null,
"is_staff": false,
"credit_interval": "monthly"
}