Skip to content
V2 (Legacy) API ReferenceGet started
Getting Started

Authentication

API keys, bearer tokens, and securing your requests.

All requests to the Linq Partner API require authentication via a bearer token in the Authorization header. The official SDKs handle authentication automatically.

Include your API token in every request:

Authorization: Bearer YOUR_TOKEN

Your token determines:

  • Which phone numbers you can send from
  • Which data you can access (chats, messages, attachments)
  • Your rate limits and daily message quotas

Contact your Linq representative to provision a bearer token for your organization. Each token is scoped to a specific set of phone numbers and permissions.

Terminal window
curl https://api.linqapp.com/api/partner/v3/chats \
-H "Authorization: Bearer $LINQ_API_KEY" \
-H "Content-Type: application/json"
import LinqAPIV3 from '@linqapp/sdk';
const client = new LinqAPIV3({
apiKey: process.env.LINQ_API_KEY, // reads LINQ_API_V3_API_KEY by default
});
import os
from linq import LinqAPIV3
client = LinqAPIV3(api_key=os.environ["LINQ_API_KEY"])
  • Use environment variables — Never hardcode tokens in source code
  • Never commit tokens — Add .env to .gitignore
  • Rotate regularly — Request new tokens periodically from your Linq representative
  • Limit access — Only share tokens with team members who need them
  • Use separate tokens — Use different tokens for development and production
StatusCodeDescription
4012004Missing or invalid bearer token. Check that your Authorization header is correctly formatted.
4032005Valid token but insufficient permissions for this resource.
4032006You cannot send from this phone number. Verify the phone is assigned to your account.
4291007Rate limit exceeded. See Rate Limits.

See Error Codes for the complete error reference and the API Reference for endpoint specifications.