API Keys
LiGo's API uses a bearer token to authenticate requests. You can obtain yours from the Integrations page in your account settings. Your API key carries many privileges, so be sure to keep it secure. Do not share your API key in publicly accessible areas such as GitHub, client-side code, or public repositories.
Authentication Methods
Include your API key in the request header using one of these formats:
# Option 1: Bearer Token
Authorization: Bearer xxx-xxx-xxx
# Option 2: X-API-Key Header
X-API-Key: xxx-xxx-xxxExample Request
Here's an example of an authenticated request using cURL:
curl -X GET "https://ligosocial.com/api/v1/ping" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Test Your Connection
Verify that your API key is working by making a request to the ping endpoint. A successful response returns the email associated with your account.
/pingResponse
{
"success": true,
"email": "[email protected]"
}Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the authentication was successful |
| string | Email address associated with the API key |
Keep Your API Key Secure
Never expose your API key in client-side code, public repositories, or share it with unauthorized users. If you believe your key has been compromised, regenerate it immediately from the Integrations page.