Skip to content

The API supports three authentication methods. For production integrations, use an API key — optionally with HMAC request signing.

MethodBest forHeader(s)
API keyProduction integrationsX-API-Key
API key + HMACHigh-security environmentsX-API-Key, X-Timestamp, X-Signature
JWT tokenTesting, portal-only endpointsAuthorization: Bearer …

Create keys in the portal under Settings → API Keys (see API keys & permissions). Pass the key in the X-API-Key header with every request:

X-API-Key: sk_prod_a1b2c3d4e5f6g7h8i9j0...
Terminal window
curl "https://restlink23telecom.com/api/v1/sms/stats?period=7d" \
-H "X-API-Key: $API_KEY"

For enhanced security, enable signature verification when creating the key. Every request must then carry three headers:

HeaderDescription
X-API-KeyYour API key
X-TimestampCurrent Unix timestamp in seconds
X-SignatureHMAC-SHA256 signature (hex)

Signature computation:

message = "{METHOD}|{path}|{timestamp}|{body}"
signature = HMAC-SHA256(api_secret, message)

Three rules to get it right:

  • path is the URL path without the query string — /api/v1/sms/stats, not /api/v1/sms/stats?period=7d.
  • body is the raw request body string; use an empty string "" for GET.
  • Timestamps must be within 5 minutes of server time, and each timestamp + signature pair is accepted once (replay protection).
import crypto from 'node:crypto';
const apiKey = process.env.API_KEY;
const apiSecret = process.env.API_SECRET;
const timestamp = Math.floor(Date.now() / 1000).toString();
const method = 'POST';
const path = '/api/v1/sms/send';
const body = JSON.stringify({
to: ['+14155551234'],
message: 'Hello!',
sender_id: 'MyApp',
});
const signature = crypto
.createHmac('sha256', apiSecret)
.update(`${method}|${path}|${timestamp}|${body}`)
.digest('hex');
const res = await fetch('https://restlink23telecom.com' + path, {
method,
headers: {
'Content-Type': 'application/json',
'X-API-Key': apiKey,
'X-Timestamp': timestamp,
'X-Signature': signature,
},
body,
});
console.log(await res.json());

Signature failures return 401 SIGNATURE_REQUIRED (headers missing) or 401 INVALID_SIGNATURE (verification failed) — see errors.

You can also authenticate by logging in with portal credentials. This is mainly useful for testing and for the few endpoints that are JWT-only (for example listing workspaces). For production integrations use API keys.

Log in
curl -X POST https://restlink23telecom.com/api/v1/user/auth \
-H "Content-Type: application/json" \
-d '{"login": "your_username", "password": "your_password"}'
200 OK
{
"status": true,
"token": "eyJhbGciOiJIUzI1NiIs..."
}

Pass the token in subsequent requests:

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...