Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage WebRTC credentials and mobile push notification settings. Use when building browser-based or mobile softphone applications. This skill provides JavaScript SDK examples.
.claude/skills/team-telnyx-telnyx-webrtc-javascript/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 111% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 71% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 91% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 77% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
bashnpm install telnyx@6.74.2
javascriptimport Telnyx from 'telnyx'; const client = new Telnyx({ apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted });
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:
javascripttry { 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 and retry with exponential backoff const retryAfter = err.headers?.['retry-after'] || 1; await new Promise(r => setTimeout(r, retryAfter * 1000)); } else if (err instanceof Telnyx.APIError) { console.error(`API error ${err.status}: ${err.message}`); if (err.status === 422) { console.error('Validation error — check required fields and formats'); } } }
Common error codes: 401 invalid API key, 403 insufficient permissions, 404 resource not found, 422 validation error (check field formats), 429 rate limited (retry with exponential backoff).
for await (const item of result) { ... } to iterate through all pages automatically.GET /mobile_push_credentials
javascript// Automatically fetches more pages as needed. for await (const pushCredential of client.mobilePushCredentials.list()) { console.log(pushCredential.id); }
Returns: alias (string), certificate (string), created_at (date-time), id (string), private_key (string), project_account_json_file (object), record_type (string), type (string), updated_at (date-time)
POST /mobile_push_credentials — Required: type, certificate, private_key, alias
javascriptconst pushCredentialResponse = await client.mobilePushCredentials.create({ createMobilePushCredentialRequest: { alias: 'LucyIosCredential', certificate: '-----BEGIN CERTIFICATE----- MIIGVDCCBTKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END CERTIFICATE-----', private_key: '-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END RSA PRIVATE KEY-----', type: 'ios', }, }); console.log(pushCredentialResponse.data);
Returns: alias (string), certificate (string), created_at (date-time), id (string), private_key (string), project_account_json_file (object), record_type (string), type (string), updated_at (date-time)
Retrieves mobile push credential based on the given push_credential_id
GET /mobile_push_credentials/{push_credential_id}
javascriptconst pushCredentialResponse = await client.mobilePushCredentials.retrieve( '0ccc7b76-4df3-4bca-a05a-3da1ecc389f0', ); console.log(pushCredentialResponse.data);
Returns: alias (string), certificate (string), created_at (date-time), id (string), private_key (string), project_account_json_file (object), record_type (string), type (string), updated_at (date-time)
Deletes a mobile push credential based on the given push_credential_id
DELETE /mobile_push_credentials/{push_credential_id}
javascriptawait client.mobilePushCredentials.delete('0ccc7b76-4df3-4bca-a05a-3da1ecc389f0');
List all On-demand Credentials.
GET /telephony_credentials
javascript// Automatically fetches more pages as needed. for await (const telephonyCredential of client.telephonyCredentials.list()) { console.log(telephonyCredential.id); }
Returns: created_at (string), expired (boolean), expires_at (string), id (string), name (string), record_type (string), resource_id (string), sip_password (string), sip_username (string), updated_at (string), user_id (string)
Create a credential.
POST /telephony_credentials — Required: connection_id
Optional: expires_at (string), name (string), tag (string)
javascriptconst telephonyCredential = await client.telephonyCredentials.create({ connection_id: '1234567890', }); console.log(telephonyCredential.data);
Returns: created_at (string), expired (boolean), expires_at (string), id (string), name (string), record_type (string), resource_id (string), sip_password (string), sip_username (string), updated_at (string), user_id (string)
Get the details of an existing On-demand Credential.
GET /telephony_credentials/{id}
javascriptconst telephonyCredential = await client.telephonyCredentials.retrieve('550e8400-e29b-41d4-a716-446655440000'); console.log(telephonyCredential.data);
Returns: created_at (string), expired (boolean), expires_at (string), id (string), name (string), record_type (string), resource_id (string), sip_password (string), sip_username (string), updated_at (string), user_id (string)
Update an existing credential.
PATCH /telephony_credentials/{id}
Optional: connection_id (string), expires_at (string), name (string), tag (string)
javascriptconst telephonyCredential = await client.telephonyCredentials.update('550e8400-e29b-41d4-a716-446655440000'); console.log(telephonyCredential.data);
Returns: created_at (string), expired (boolean), expires_at (string), id (string), name (string), record_type (string), resource_id (string), sip_password (string), sip_username (string), updated_at (string), user_id (string)
Delete an existing credential.
DELETE /telephony_credentials/{id}
javascriptconst telephonyCredential = await client.telephonyCredentials.delete('550e8400-e29b-41d4-a716-446655440000'); console.log(telephonyCredential.data);
Returns: created_at (string), expired (boolean), expires_at (string), id (string), name (string), record_type (string), resource_id (string), sip_password (string), sip_username (string), updated_at (string), user_id (string)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 7,154 | 5,792 | -19% | 1 | 1 | 0% | 1,613 | 3,411 | +111% | 0 | 0 | — |
case-02 | fail→pass | 12,845 | 5,250 | -59% | 1 | 1 | 0% | 2,375 | 3,090 | +30% | 0 | 0 | — |
case-03 | fail→pass | 13,471 | 10,847 | -19% | 1 | 1 | 0% | 2,598 | 4,450 | +71% | 0 | 0 | — |
case-04 | pass→pass | 20,001 | 13,714 | -31% | 1 | 1 | 0% | 4,307 | 4,894 | +14% | 0 | 0 | — |
case-05 | fail→pass | 9,519 | 6,990 | -27% | 1 | 1 | 0% | 1,815 | 3,474 | +91% | 0 | 0 | — |
case-06 | pass→pass | 6,511 | 5,168 | -21% | 1 | 1 | 0% | 1,257 | 3,164 | +152% | 0 | 0 | — |
case-07 | fail→pass | 7,922 | 3,737 | -53% | 1 | 1 | 0% | 1,558 | 2,755 | +77% | 0 | 0 | — |
case-08 | fail→pass | 4,772 | 3,845 | -19% | 1 | 1 | 0% | 944 | 2,806 | +197% | 0 | 0 | — |
case-09 | fail→pass | 6,294 | 4,461 | -29% | 1 | 1 | 0% | 1,159 | 2,966 | +156% | 0 | 0 | — |
case-10 | pass→pass | 5,264 | 5,398 | +3% | 1 | 1 | 0% | 1,073 | 3,133 | +192% | 0 | 0 | — |
case-11 | fail→pass | 5,488 | 4,694 | -14% | 1 | 1 | 0% | 1,023 | 3,010 | +194% | 0 | 0 | — |
case-12 | pass→pass | 6,455 | 4,155 | -36% | 1 | 1 | 0% | 1,326 | 2,732 | +106% | 0 | 0 | — |
case-13 | fail→pass | 15,855 | 7,659 | -52% | 1 | 1 | 0% | 2,990 | 3,634 | +22% | 0 | 0 | — |
case-14 | fail→pass | 11,004 | 4,685 | -57% | 1 | 1 | 0% | 2,072 | 2,980 | +44% | 0 | 0 | — |
case-15 | pass→pass | 7,220 | 2,350 | -67% | 1 | 1 | 0% | 1,296 | 2,391 | +84% | 0 | 0 | — |
case-16 | pass→pass | 6,463 | 3,284 | -49% | 1 | 1 | 0% | 1,278 | 2,695 | +111% | 0 | 0 | — |
case-17 | fail→pass | 10,160 | 3,649 | -64% | 1 | 1 | 0% | 1,924 | 2,728 | +42% | 0 | 0 | — |
case-18 | fail→pass | 7,318 | 4,705 | -36% | 1 | 1 | 0% | 1,377 | 3,011 | +119% | 0 | 0 | — |
case-19 | pass→pass | 5,304 | 3,780 | -29% | 1 | 1 | 0% | 997 | 2,819 | +183% | 0 | 0 | — |
case-20 | pass→pass | 4,421 | 3,302 | -25% | 1 | 1 | 0% | 870 | 2,646 | +204% | 0 | 0 | — |
case-21 | pass→pass | 3,583 | 1,497 | -58% | 1 | 1 | 0% | 617 | 2,251 | +265% | 0 | 0 | — |
case-22 | pass→pass | 9,700 | 2,772 | -71% | 1 | 1 | 0% | 1,821 | 2,583 | +42% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.