Official client library for the sipgate REST API v2. Current stable version 5.30.1. Maintained actively by sipgate. Key differentiators: native Promise-based API with built-in error handling for non-2xx responses (since 5.0.0, breaking change), configurable response interceptor, and support for legacy error handling opt-out. Covers all sipgate API endpoints (users, calls, SMS, contacts, etc.) with automatic authentication via API token. No external HTTP dependencies.
npm install sipgate-rest-api-client-v2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a client instance and fetch all users, handling errors with the ResponseErrorPayload interface.
Wrap calls in .catch() and access error details via error.payload. For old behavior, set skipResponseErrorHandling to true.
Rely on catch() handler. Only use onPromiseResolved if you need to process successful responses.
Use import syntax or dynamic import. For CommonJS projects, set type: "module" or use .mjs extension.
Use environment variables and never hardcode tokens.
Add "type": "module" to package.json or rename file to .mjs. Alternatively use dynamic import.
Ensure you use: import createClient from 'sipgate-rest-api-client-v2' (default import).
Check version >=5.0.0 and ensure catch() receives the correct error shape. For non-HTTP errors, payload is undefined.
No dependency data recorded yet.