forked from nxtele/http-api-document
-
Notifications
You must be signed in to change notification settings - Fork 1
NXCC Iframe
henryou edited this page May 17, 2024
·
2 revisions
https://nxlink.nxcloud.com/admin/#/nxcc
// Create iframe
// Recommended width is 380px, height is 690px
<iframe id="iframe" allow="camera *; microphone *; autoplay *; hid *" src="https://nxlink.nxcloud.com/admin/#/nxcc"></iframe>| Field | Description |
|---|---|
| Account (email) | |
| password | Password |
| lang | Language, currently supports Chinese (zh-CN), English (en-US), Spanish (es-MX) |
const message = {
type: 'init',
content: {
email:email,
password: password,
lang: "zh-CN",
}
}
const mapFrame = document.getElementById("iframe")
mapFrame.onload = function() {
const iframeWin = mapFrame.contentWindow;
iframeWin.postMessage(message, '*');
}// iframe sends message to the system via postMessage
window.parent.postMessage(data, '*');-
If the login account has an agent, the following fields are passed; if there is no agent, no fields are passed.
Field Description email Login account sipNum Phone number groupNo Agent group number // Callback data event.data:{ type: 'login', content: { email: '', sipNum: '', groupNo: '' } }
-
code Description 1 The account has an agent 2 The account does not have an agent or the agent status is closed // Callback data event.data:{ type: 'agentExists', content: { code: 1 } }
-
Code Phone Status 0 Dialing out 1 Incoming call 2 In call 3 Phone disconnected 4 Phone registered successfully 5 Hung up 6 Account not logged in -1 Phone registration failed When the phone status is dialing out (0), incoming call (1), in call (2), or hung up (5), the following fields are returned:
Field Description callId Call ID direction Call scenario: 0 for incoming, 1 for outgoing, 2 for auto-dial to agent caller Caller number callee Callee number orderId Custom user ID, string, 32 characters params Custom user fields, supports JSON string callStartTimestamp Timestamp when call is initiated/received callConnectedTimestamp Timestamp when call is connected callHangUpTimestamp Timestamp when call is hung up // Callback data event.data:{ type: 'dialStatus', content: { code: 0, callId: '', orderId: '', direction: 1, caller: '', callee: '', params: '', callStartTimestamp: '', callConnectedTimestamp: '', callHangUpTimestamp: '' } }
-
code Description 1 Available 2 Busy (including initiating a call/receiving a call, in call, in wrap-up) // Callback data event.data:{ type: 'agentStatus', content: { code: 1 } }
-
// Callback data event.data:{ type: 'logout' }
-
// Callback data event.data:{ type: 'tokenInvalid' }
const message = {
type: 'callOut',
content: {
caller: '', // varchar(32),caller, if left empty a random number will be used
callee: "8524444", // varchar(32),callee, should include country code, e.g., for Hong Kong:852***
countryCode: "852", // callee country code
orderId: "66493f1afaa3", // varchar(32),custom orderId, optional
params: "" // custom fields
}
}
const mapFrame = document.getElementById("iframe")
const iframeWin = mapFrame.contentWindow;
iframeWin.postMessage(message, '*');Introduction
- Send Message
- Mark Incoming Message as Read
- Upload Media File
- Get Media File
- Delete Media File
- Webhook
- Query Number Information
- Query Message Template
- Create Message Template
- Edit Message Template
- Delete Message Template
- Upload Template Example File
- Embedded Page Login
- Create Client Application
- List of Phone Numbers for Client Application
- Get Verification Code
- Verify Verification Code
- Create Local Client
Short message
Voice
Call Center(NXLink)
- Web Iframe
- Manual Dial Record
- Manual Dial Record Query By orderId
- List Agent Information
- List Agent Status
- List Queue
- List Agents In Queue
- List Agent Efficiency
- Update Queue Agents
- Create AutoDial Task
- Webhook - Manual Dial
AI Agent(NXLink)
- AI Agent Task List
- Query Call Records
- Append Contacts to an Existing Task
- Delete Contacts
- Call Record Callback
Call Center(Callbot)
- Callbot API Summary
- Callbot API Authorization
- Callbot API Ping
- Create Auto Dial Task
- Add Contact List To Task
- Create Task And Add Contact
- Start Or Pause Task
- Update Task Parameters
- Get List Task
- List Call
- List Task Orders
- Stop Order
- Get Call Detail By Order
- Webhook - By Call
- Webhook - By Order
- Webhook - Task Status
Flash Call
Short links
邮件验证码
DID号码
通用
号码检测