Registry / communication / sipgate-rest-api-client

sipgate-rest-api-client

JSON →
library2.4.1jsnpmunverified

Unofficial or official Node.js client for the sipgate REST API v1. Version 2.4.1 is the latest stable release. It supports phone call management, SMS, fax, and contacts operations. Differentiates by providing a typed, promise-based interface for sipgate API services, handling authentication and pagination internally. Suitable for both browser (with bundler) and Node.js environments.

npm install sipgate-rest-api-client
INSTALL
IMPORT
SIG · SIPGATE-REST-API-C
S
sipgate-rest-api-client
communicationjavascriptv2.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SipgateClient
import { SipgateClient } from 'sipgate-rest-api-client'
const SipgateClient = require('sipgate-rest-api-client')
Default export is an object { SipgateClient }. In CommonJS use require('sipgate-rest-api-client').SipgateClient.
PhoneCall
import { PhoneCall } from 'sipgate-rest-api-client'
const { PhoneCall } = require('sipgate-rest-api-client')
PhoneCall is a named export. Non-ESM bundlers may require destructuring from default export.
Sms
import { Sms } from 'sipgate-rest-api-client'
import Sms from 'sipgate-rest-api-client'
Sms is not a default export. Must use named import.

Shows how to initialize the client with API credentials and make a phone call.

import { SipgateClient } from 'sipgate-rest-api-client'; const client = new SipgateClient({ tokenId: process.env.SIPGATE_TOKEN_ID ?? '', token: process.env.SIPGATE_TOKEN ?? '' }); async function makeCall() { try { const call = await client.phoneCalls.makeCall({ callerId: '0190...', calleeNumber: '0176...', deviceId: 'device-id' }); console.log('Call initiated:', call.id); } catch (error) { console.error('Error:', error); } } makeCall();
Debug
Known issues
gotchaAPI rate limiting: sipgate REST API enforces rate limits; client does not auto-retry.
fix
Implement exponential backoff or use a queuing mechanism.
affects: >=1.0.0
gotchaEnvironment variables for credentials: hardcoding tokens in source code is a security risk.
fix
Use environment variables or a secure secret store.
affects: >=2.0.0
deprecatedDeprecated method 'sendSms' replaced by 'sms.send' in v2.0.
fix
Use client.sms.send() instead of client.sendSms().
affects: >=2.0.0
gotchaBrowser usage requires bundler (e.g., webpack) due to CommonJS dependency on axios.
fix
Use a bundler setting for browser, or use the browser build if available.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module not supported
Using require() with an ESM-only package (if future versions drop CJS).
fix
Use import or convert project to ESM (type: 'module').
Error: SIPGATE_TOKEN_ID and SIPGATE_TOKEN environment variables not set
Missing required environment variables for authentication.
fix
Set process.env.SIPGATE_TOKEN_ID and SIPGATE_TOKEN in your environment.
TypeError: client.phoneCalls.makeCall is not a function
Using version <2.0 where phoneCalls API was not available.
fix
Upgrade to version >=2.0 or use the appropriate method for your version.
Upgrade
Version history
2.4.1latest on npm
Audit
Dependencies
axiosrequiredHTTP client for API requests
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
sipgate-rest-api-client — npm install sipgate-rest-api-client · libregistry