Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides JavaScript SDK examples for configuring voicemail, voice channels, and E911 emergency services on Telnyx phone numbers.
25% 100%+75 ptsof test cases passed
Passed 24 of 24 test cases with the skill, and 6 of 24 without it.
Write a Node.js snippet using the Telnyx SDK to create a SIP Credential Connection named 'Office SIP Trunk' with username 'user123' and password 'pass123'. Output the code.
Uses client.credentialConnections.create with user_name and password fields
This test ran on v2. v3 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
npm install [email protected]
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
publicKey: process.env['TELNYX_PUBLIC_KEY'], // Required for client.webhooks.unwrap() (webhook verification)
});
All examples below assume client is already initialized as shown above.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
try {
const result = await client.messages.send({ to: '+13125550001', from: '+13125550002', text: 'Hello' });
} catch (err) {
if (err instanceof Telnyx.APIConnectionError) {
console.error('Network error — check connectivity and retry');
} else if (err instanceof Telnyx.RateLimitError) {
// 429: rate limited — wait, then retry the request (bounded exponential backoff)
const retryAfter = err.headers?.['retry-after'] || 1;
await new Promise(r => setTimeout(r, retryAfter * 1000));
// ...retry the call here (give up after a few attempts)
} else if (err instanceof Telnyx.APIError) {
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.