Tia 판매

Integrate SMS, voice calls, WhatsApp messaging, and Plivo XML call-flow generation into Node.js applications via the Plivo REST API.
This block is the full source of the plivo npm SDK (v4.77.0), providing REST API clients for voice calls, SMS, WhatsApp messaging, phone number management, XML generation, JWT utilities, and PHLO orchestration. The typical buyer is a Node.js or TypeScript backend developer embedding Plivo communications into an Express or serverless application without depending on the published npm package directly.
source/base.js - Base classes PlivoResource and PlivoGenericResponse shared by all resource modulessource/version.js - SDK version stringsource/resources/accounts.js - Account and sub-account CRUD operationssource/resources/applications.js - Application (SIP/voice app) managementsource/resources/brand.js - 10DLC brand registrationsource/resources/call.js - Outbound/inbound call controlsource/resources/callFeedback.js - Call quality feedback submissionsource/resources/campaign.js - 10DLC campaign managementsource/resources/complianceApplications.js - Compliance application lifecyclesource/resources/complianceDocumentTypes.js - Compliance document type lookupssource/resources/complianceDocuments.js - Compliance document upload/managementsource/resources/complianceRequirements.js - Compliance requirement queriessource/resources/conferences.js - Conference room management and controlsource/resources/endUsers.js - End-user regulatory profile managementsource/resources/endpoints.js - SIP endpoint CRUDsource/resources/hostedMessagingNumber.js - Hosted messaging number managementsource/resources/loa.js - Letter of authorization managementsource/resources/lookup.js - Phone number lookup / carrier infosource/resources/maskingSession.js - Number masking session managementsource/resources/media.js - MMS media resource accesssource/resources/messages.js - SMS and WhatsApp message sendingsource/resources/multiPartyCall.js - Multi-party call orchestration격리된 샌드박스를 띄워 서버에서 바로 실행하세요 — 로컬 설정 불필요.
이 버전에 대한 Tetrees AI Review
This JavaScript library / package completed archive review. Structure, dependency manifests, documentation, functional source, and common risk patterns were checked by the Tetrees verification pipeline; runtime phases are stated separately.
Deterministic AVCP artifact review
파이프라인 avcp-2026-08-04.1 · SHA-256 218cbc8d98c4f915…
This version-scoped review deterministically inspects the submitted archive for structure, dependencies, documentation, functional source, and common malicious or high-risk signals. Build and test phases are reported as passed only after an isolated sandbox audition. It is not a guarantee of perfect security.
검토일 2026년 8월 4일
이 제품을 AI IDE, 웹 빌더 또는 클라우드 IDE로 바로 가져오세요.
Tetrees를 호환 AI IDE에 연결해 보유 제품을 불러오고, 판매자 업로드 권한을 노출하지 않은 채 검증된 ZIP을 받으세요.
아직 리뷰가 없습니다.
토론을 불러오는 중…
source/resources/numbers.js - Phone number search, buy, and managementsource/resources/phlo.js - PHLO (visual call flow) executionsource/resources/phloMultiPartyCallMember.js - PHLO MPC member controlsource/resources/phloMultipartyCall.js - PHLO multi-party call nodesource/resources/phoneNumberCompliance.js - Per-number compliance linkingsource/resources/powerpacks.js - Powerpack (message pool) managementsource/resources/pricings.js - Pricing information queriessource/resources/profile.js - Regulatory profile managementsource/resources/recordings.js - Call recording retrievalsource/resources/token.js - Access token generationsource/resources/tollfree_verification.js - Toll-free number verificationsource/resources/verify.js - Verify (OTP) session managementsource/resources/verifyCallerId.js - Caller ID verificationsource/rest/axios.js - Axios-based HTTP transport layersource/rest/client.js - Main Client class wiring all resourcessource/rest/client-test.js - Test client variantsource/rest/request.js - Low-level request buildersource/rest/request-test.js - Test request buildersource/rest/utils.js - REST utility helperssource/utils/common.js - Generic helpers (extend, etc.)source/utils/exceptions.js - SDK exception classessource/utils/interactive.js - Interactive (PHLO) helperssource/utils/jsonStrinfigier.js - Custom JSON serializersource/utils/jwt.js - JWT generation utilitiessource/utils/location.js - Geographic/location utilitiessource/utils/plivoxml.js - XML builder (Response, Speak, etc.)source/utils/restException.js - REST error classsource/utils/security.js - Request signature validation (v2)source/utils/template.js - WhatsApp template buildersource/utils/v3Security.js - Request signature validation (v3)npm install axios base-64 build-url form-data https-proxy-agent joi jsonwebtoken lodash querystring request uri-parser utf8 xml2js xmlbuilder @types/node
No native modules, no pod install, no Android linking required. The source is pure JavaScript (ES modules).
source/ directory into your project, e.g. src/plivo/.package.json:
{ "type": "module" }
Or, if using TypeScript with CommonJS, configure Babel with @babel/plugin-transform-modules-commonjs and set "allowSyntheticDefaultImports": true in tsconfig.json.tsconfig.json:
{
"compilerOptions": {
"baseUrl": ".",
"paths": { "plivo-src/*": ["src/plivo/*"] }
}
}
export PLIVO_AUTH_ID=your_auth_id
export PLIVO_AUTH_TOKEN=your_auth_token
Client constructor reads PLIVO_AUTH_ID and PLIVO_AUTH_TOKEN automatically when called with no arguments.class PlivoGenericResponse {
id: string;
[key: string]: any;
constructor(params: Record<string, any>, idString?: string): PlivoGenericResponse;
}
Base response wrapper returned by most resource operations. If idString is provided and exists in params, it is exposed as .id; otherwise falls back to request_uuid. Use this when inspecting raw API responses or building custom resource classes.
class PlivoResource {
constructor(action: string, klass: any, idField: string, request: Function): void;
update(params: Record<string, any>, id?: string): Promise<this>;
delete(params?: Record<string, any>): Promise<void>;
}
Abstract base for all Plivo resource objects. Provides update() and delete() as promise-returning methods that POST or DELETE to the REST API. Extend this when adding a custom resource module on top of the SDK source.
rest/client.js)class Client {
constructor(authId?: string, authToken?: string, options?: Record<string, any>): void;
calls: CallInterface;
messages: MessagesInterface;
numbers: NumbersInterface;
lookup: LookupInterface;
conferences: ConferencesInterface;
recordings: RecordingsInterface;
accounts: AccountsInterface;
// ... all other resource namespaces
}
The main entry point. Instantiate once and use its resource properties to interact with every Plivo API surface. Reads credentials from environment variables when called with no arguments.
Import the client from the local source copy and send a text message. The messages.create() method returns a promise resolving to a PlivoGenericResponse-compatible object with the message_uuid exposed as .id.
import { Client } from './src/plivo/rest/client.js';
const client = new Client(); // reads PLIVO_AUTH_ID, PLIVO_AUTH_TOKEN
client.messages.create({
src: '+14156667778',
dst: '+14156667777',
text: 'Hello from the embedded Plivo SDK source.',
}).then((response) => {
console.log('Message UUID:', response.id);
}).catch((err) => {
console.error('Send failed:', err.message);
});
Use calls.create() to initiate a call. The third argument is the answer URL, which Plivo fetches to retrieve a Plivo XML response controlling the call.
import { Client } from './src/plivo/rest/client.js';
const client = new Client(
process.env.PLIVO_AUTH_ID,
process.env.PLIVO_AUTH_TOKEN
);
client.calls.create(
'+14156667778', // from
'+14156667777', // to
'https://example.com/answer.xml'
).then((response) => {
console.log('Call request UUID:', response.requestUuid);
}).catch(console.error);
Use the plivoxml utilities to build a Response document returned from your Express route. This avoids an external dependency on the npm package.
import { Response } from './src/plivo/utils/plivoxml.js';
import express from 'express';
const app = express();
app.post('/answer.xml', (_req, res) => {
const plivoResponse = new Response();
plivoResponse.addSpeak('Welcome to the Plivo demo. Goodbye.');
res.set('Content-Type', 'text/xml');
res.send(plivoResponse.toXML());
});
app.listen(3000, () => console.log('Webhook server on port 3000'));
import { Client } from './src/plivo/rest/client.js';
const client = new Client();
client.lookup.get('+14156667778').then((info) => {
console.log('Carrier:', info.carrier);
console.log('Number type:', info.number_type);
}).catch(console.error);
base.js - Defines PlivoResource (CRUD scaffolding) and PlivoGenericResponse (response normalization); every resource module extends these.version.js - Exports the SDK version string used in User-Agent headers.resources/ - One file per Plivo API resource group; each exports a resource class and an interface class wired into Client.rest/client.js - Instantiates all resource interfaces, configures the HTTP transport, and exposes them as named properties on Client.rest/axios.js - Axios adapter that handles authentication headers, proxy support, and response/error normalization.rest/request.js - Constructs signed HTTP requests; used internally by the axios adapter.rest/utils.js - URL and parameter encoding helpers shared across the transport layer.utils/common.js - Generic extend and other object utilities used throughout the SDK.utils/exceptions.js - SDK-level exception classes for input validation errors.utils/jwt.js - Generates Plivo access tokens (for WebRTC clients) using jsonwebtoken.utils/plivoxml.js - Full TwiML-style XML builder: Response, Speak, Play, Dial, Record, etc.utils/security.js - v2 webhook signature validation helpers.utils/v3Security.js - v3 webhook signature validation (for voice v3 events).utils/template.js - WhatsApp template message payload builder.utils/restException.js - Wraps HTTP error responses into a typed exception.utils/interactive.js - Helpers for PHLO interactive node payloads.utils/location.js - Encodes geographic data for number search requests.utils/jsonStrinfigier.js - JSON serializer that handles BigInt and circular refs.import/export; if your project is CJS, either set "type":"module" or transpile with Babel (@babel/plugin-transform-modules-commonjs).PLIVO_AUTH_ID / PLIVO_AUTH_TOKEN: Client() with no args will silently use undefined credentials and every request will return 401 - always verify env vars are exported before the process starts.request package deprecation warnings: The source depends on the legacy request package; pin it to ^2.88.2 and suppress deprecation warnings with NODE_NO_WARNINGS=1 if needed.npm install axios@1.X-Plivo-Signature on incoming webhooks using utils/security.js or utils/v3Security.js; skipping this exposes your endpoint to spoofed requests.Content-Type: text/xml; forgetting to set the header causes call failures even when the XML body is correct.I have embedded the Plivo Node.js SDK source (plivo@4.77.0) at `src/plivo/`
in my project. The USAGE.md at the project root documents all exports,
file responsibilities, and working examples.
Please help me integrate Plivo into my project step by step:
1. Read USAGE.md and `src/plivo/rest/client.js` to understand the Client API.
2. Read `src/plivo/utils/plivoxml.js` to understand the XML builder.
3. Add the required npm dependencies listed in USAGE.md ## Required dependencies.
4. Create a `src/plivoService.ts` that:
- Instantiates Client using PLIVO_AUTH_ID and PLIVO_AUTH_TOKEN env vars.
- Exports a `sendSms(from, to, text)` function.
- Exports a `makeCall(from, to, answerUrl)` function.
- Exports an Express middleware `answerWebhook` that returns Plivo XML
saying "Hello from my app." using the Response builder.
5. Wire `answerWebhook` into my Express app at POST /plivo/answer.
6. Do not install the `plivo` npm package; import only from `src/plivo/`.
The Plivo Node.js SDK is released under the MIT License. See source/LICENSE if present in this block, or refer to the upstream repository. Upstream package: plivo on npm - source repository at github.com/plivo/plivo-node.
This product’s unique contribution is clean room implementation of valuable code block into AVCP compatible standard.
전체 설치 가이드와 연동 프롬프트는 구매 후 열람할 수 있습니다.
Automation, Utilities & Developer Tools
무료