List Accounts
curl --request GET \
--url https://api.lobstr.io/v1/accounts \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/accounts"
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/accounts', 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/accounts",
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/accounts"
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/accounts")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/accounts")
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_body{
"total_results": 123,
"limit": 123,
"page": 123,
"total_pages": 123,
"result_from": 123,
"result_to": 123,
"data": [
{}
],
"next": {},
"previous": {},
"id": "<string>",
"object": "<string>",
"username": "<string>",
"created_at": "<string>",
"last_synchronization_time": "<string>",
"status": "<string>",
"status_code_info": "<string>",
"status_code_description": "<string>",
"type": "<string>",
"params": {},
"updated_at": {},
"account_type_hash": "<string>",
"squids": [
{}
],
"baseurl": "<string>",
"cookies": [
{}
],
"icon": "<string>"
}Account
List Accounts
Retrieve a paginated list of all connected platform accounts
GET
/
v1
/
accounts
List Accounts
curl --request GET \
--url https://api.lobstr.io/v1/accounts \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/accounts"
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/accounts', 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/accounts",
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/accounts"
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/accounts")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/accounts")
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_body{
"total_results": 123,
"limit": 123,
"page": 123,
"total_pages": 123,
"result_from": 123,
"result_to": 123,
"data": [
{}
],
"next": {},
"previous": {},
"id": "<string>",
"object": "<string>",
"username": "<string>",
"created_at": "<string>",
"last_synchronization_time": "<string>",
"status": "<string>",
"status_code_info": "<string>",
"status_code_description": "<string>",
"type": "<string>",
"params": {},
"updated_at": {},
"account_type_hash": "<string>",
"squids": [
{}
],
"baseurl": "<string>",
"cookies": [
{}
],
"icon": "<string>"
}This endpoint retrieves a paginated list of all connected platform accounts (like Twitter, LinkedIn, Facebook) associated with the authenticated user.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYResponse Structure
integer
Total number of accounts. Example:
2integer
Maximum results per page. Example:
50integer
Current page number. Example:
1integer
Total number of pages. Example:
1integer
Starting result index. Example:
1integer
Ending result index. Example:
3array
Array of account objects. Example:
[...]string | null
URL for next page (null if last page). Example:
nullstring | null
URL for previous page (null if first page). Example:
nullAccount Object Fields
string
Unique account identifier. Example:
"6e5f36d27502ec69fda745ec59ead509"string
Always “account”. Example:
"account"string
Platform username. Example:
"MisterDebugger"string
Account creation timestamp (ISO 8601). Example:
"2025-02-11T08:28:14Z"string
Last sync timestamp. Example:
"2025-02-11T08:28:14Z"string
HTTP status code. Example:
"200"string
Status information. Example:
"synchronized"string
Human-readable status message. Example:
"Success!"string
Account type identifier. Example:
"facebook-sync"object
Account parameters (default and user-specific). Example:
{"default": {}, "user": {}}string | null
Last update timestamp. Example:
nullstring
Account type identifier hash. Example:
"16f5b7f91e8fc533eab88be973273a02"array
Array of squids using this account. Example:
[]string
Platform base URL. Example:
"https://www.facebook.com"array
Required cookie names for authentication. Example:
[{"name": "c_user", "required": true}]string
Base64 encoded platform icon. Example:
"<base64 image data>"Use this endpoint to check which platform accounts are currently synced and their status before running squids that require authentication.
The squids array shows which squids are currently using each account, helping you manage account usage across your projects.
Check the status_code_info field to identify accounts with expired cookies that need re-synchronization.
Code Examples
curl -X GET "https://api.lobstr.io/v1/accounts" \
-H "Authorization: Token YOUR_API_KEY"
import requests
url = "https://api.lobstr.io/v1/accounts"
headers = {
"Authorization": "Token YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
print(f"Total accounts: {data['total_results']}")
print(f"Showing {data['result_from']}-{data['result_to']}\n")
# Display connected accounts
for account in data['data']:
status = "✓" if account['status'] == "200" else "✗"
print(f"{status} {account['username']} ({account['type']})")
print(f" ID: {account['id']}")
print(f" Status: {account['status_code_info']}")
print(f" Platform: {account['baseurl']}")
print()
Response
200
{
"total_results": 2,
"limit": 50,
"page": 1,
"total_pages": 1,
"result_from": 1,
"result_to": 3,
"data": [
{
"id": "6e5f36d27502ec69fda745ec59ead509",
"object": "account",
"username": "MisterDebugger",
"created_at": "2025-02-11T08:28:14Z",
"last_synchronization_time": "2025-02-11T08:28:14Z",
"status": "200",
"status_code_info": "synchronized",
"status_code_description": "Success!",
"type": "facebook-sync",
"params": {
"default": {},
"user": {}
},
"updated_at": null,
"account_type_hash": "16f5b7f91e8fc533eab88be973273a02",
"squids": [],
"baseurl": "https://www.facebook.com",
"cookies": [
{"name": "c_user", "required": true},
{"name": "xs", "required": true}
],
"icon": "<base64 image data>"
},
{
"id": "abfeb440ceccdfab974e8d261836c9d6",
"object": "account",
"username": "MisterDebugger",
"created_at": "2025-02-11T08:28:22Z",
"last_synchronization_time": "2025-02-11T08:28:22Z",
"status": "200",
"status_code_info": "synchronized",
"status_code_description": "Success!",
"type": "twitter-sync",
"params": {
"default": {},
"user": {}
},
"updated_at": null,
"account_type_hash": "9853173fc00a940a33d7a420c176ad3b",
"squids": [],
"baseurl": "https://x.com",
"cookies": [
{"name": "auth_token", "required": true},
{"name": "ct0", "required": true}
],
"icon": "<base64 image data>"
}
],
"next": null,
"previous": null
}
401
{
"detail": "Invalid token."
}