Authentication
Tenant-Level Authentication
Basic Information
Path: /token Method: GET Interface Description:
1. Authentication Parameters
Name | Description |
---|---|
AppId | Tenant ID |
Timestamp | 10-digit timestamp, to be generated by yourself |
Token | Authentication signature, valid for 5 minutes, please refer to section 2 for generation |
2. Authentication Signature Parameter Description
Token signature uses HMAC-SHA1 for encryption and is generated through AppId, Timestamp, and Secret. The generation method is as follows:
Field Name | Description | Example |
---|---|---|
Message | Tenant ID + Timestamp | a54a8b77-f12d-4ac9-742d-5b2bef5c4d111612513422 |
Algorithm | sha1 | |
Secret | Key used to encrypt the message, each tenant has a separate key, please contact the administrator for key information | 1234569abcdef |
Token | Generated based on message, algorithm, and key | 5320d95c846d4a26d4b19c762a1d063ec50f4da6 |
Notes: |
- Token generation can refer to the website: 【https://1024tools.com/hmac】
- Please contact the relevant person in charge for the key
3 Request Example
Query AI Auto Call Task Call Records
Basic Information
Path: /api/v1/call-calls/task Method: POST Interface Description:
Overview
Query the call records under the AI auto call task, the interval between the start and end times of the call cannot be greater than 7 days.
Example
Request
$ curl 'http://ip:port/api/v1/call-calls/task?AppId={appid}&Timestamp={mytime}&Token={token}' -i -X POST -H 'Content-Type: application/json' -d '{
"pageNum":1,
"pageSize":20,
"adTaskId":123456,
"startDateTime":"2022-03-18 10:10:00",
"endDateTime":"2022-03-18 11:10:00",
"toNumber":"15888888888"
}'
Response
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"paging": {
"pageNum": 1,
"pageSize": 20,
"total": 1
},
"data": [
{
"id": 168,
"callId": "2a1",
"workflow": 4,
"fromNumber": "05388593",
"toNumber": "15201111111",
"relayNumber": "05388593",
"callStartTime": [
2021,
10,
15,
14,
26,
35
],
"callEndTime": [
2021,
10,
15,
14,
27,
23
],
"callDuration": 48,
"callRecordUrl": "https://prords.iao.com/9ff65-0e6a-767.mp3?OSSAccessKeyId=bPehfu&Expires=16658153&Signature=y7qb%2FStD4%3D",
"customerProvince": "Beijing",
"customerCity": "Beijing",
"userAnsweredFlag": 1,
"userAnsweredCount": 4,
"userAnsweredEffectiveCount": 2,
"routerId": null,
"routerName": null,
"readFlag": 0,
"transferAgentFlag": 0,
"agentId": null,
"agentName": null,
"queueId": null,
"queueName": null,
"robotNames": [
"Do not touch script"
],
"labelInfos": [
"11"
],
"adTaskId": 111,
"variables": null,
"ringingTime": 16,
"ringResult": "Not selected queue",
"hangupCause": null,
"hangupBy": "IVR",
"adTaskName": "AI Outbound call",
"callDirection": "Call out",
"intentionLabelKey": null,
"intentionLabelName": null,
"callResult": 1,
"calledResult": 1,
"taskContactBatchName": "Contact A",
"agentCallDuration": 0,
"customerNumber": "13394837483",
"remark": null
}
]
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Body
Name | Type | Required | Default Value | Notes | Additional Information |
---|---|---|---|---|---|
pageNum | number | Not required | Page number, default is 1 | ||
pageSize | number | Not required | Number of items per page, default is 20, maximum is 50 | ||
adTaskId | number | Required | Task ID | ||
startDateTime | string | Not required | Start time of the call | Example: 2021-10-10 00:00:00 | |
endDateTime | string | Not required | End time of the call | Example: 2021-10-17 00:00:00 | |
toNumber | string | Not required | Called number |
Response Data
Name | Type | Required | Default Value | Notes | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success indicator | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility | ||
paging | object | Not required | |||
├─ pageNum | number | Not required | Page number | ||
├─ pageSize | number | Not required | Number of items per page | ||
├─ total | number | Not required | Total count | ||
data | object[] | Not required | Item Type: object | ||
├─ id | number | Required | ID | ||
├─ callId | string | Required | Call ID | ||
├─ workflow | number | Required | Call type, 4 - automatic outgoing call | ||
├─ fromNumber | string | Required | Calling number | ||
├─ toNumber | string | Required | Called number | ||
├─ relayNumber | string | Required | Relay number | ||
├─ callStartTime | string | Required | Call start time | ||
├─ callEndTime | string | Required | Call end time | ||
├─ callDuration | number | Required | Total call duration (seconds) | ||
├─ callRecordUrl | string | Required | Call recording URL | ||
├─ customerProvince | string | Required | Customer number - Province | ||
├─ customerCity | string | Required | Customer number - City | ||
├─ routerId | null | Required | Router ID | ||
├─ routerName | null | Required | Router name | ||
├─ readFlag | number | Required | Read flag, 0 - unread, 1 - read | ||
├─ transferAgentFlag | number | Required | Transfer to agent flag, 0 - no, 1 - yes | ||
├─ agentId | null | Required | Agent ID | ||
├─ agentName | null | Required | Agent name | ||
├─ queueId | null | Required | Queue ID | ||
├─ queueName | null | Required | Queue name | ||
├─ robotNames | string[] | Required | Dialog names array: ["Dialog 1", "Dialog 2"] | Item Type: string | |
├─ | Not required | ||||
├─ labelInfos | string[] | Required | Normal label array: ["Fruit", "Vegetable"] | Item Type: string | |
├─ | Not required | ||||
├─ adTaskId | number | Required | Automatic outgoing call task ID | ||
├─ variables | string[] | Required | Dialog variables | Item Type: string | |
├─ | Not required | ||||
├─ ringingTime | number | Required | Ringing time | ||
├─ ringResult | string | Required | Call result | ||
├─ hangupCause | null, string | Required | Cause of customer unanswered hangup | ||
├─ hangupBy | string | Required | Hangup party | ||
├─ adTaskName | string | Required | Automatic outgoing call task name | ||
├─ callDirection | string | Required | Call direction | ||
├─ intentionLabelKey | string | Required | Intention label key | ||
├─ intentionLabelName | string | Required | Intention label name | ||
├─ customerNumber | string | Required | Customer number | ||
userAnsweredFlag | number | Not required | Effective call (0 no, 1 yes) | ||
userAnsweredCount | number | Not required | User interaction count | ||
userAnsweredEffectiveCount | number | Not required | User effective interaction count | ||
remark | string | Not required | Remark | ||
allRecordUrlList | object[] | Not required | Recordings | Item Type: object | |
├─ recordUrl | string | Not required | Recording URL | ||
├─ recordType | string | Not required | Type | ||
├─ contactDetailRel | object[] | Not required | Contact information | Item Type: object | |
├─ name | string | Not required | Contact name | ||
├─ mobile | string | Not required | Mobile number | ||
├─ companyName | string | Not required | Company name | ||
├─ remark | string | Not required | Remark | ||
├─ variates | object[] | Not required | Variable collection | Item Type: object | |
├─ key | string | Not required | Variable name | ||
├─ type | string | Not required | Variable type | ||
├─ value | string | Not required | Variable value | ||
├─ customerAnswerAt | string | Not required | Customer answer time | ||
├─ isFinalCall | string | Not required | Not in use | ||
├─ agentCallDuration | number | Not required | Agent call duration | ||
├─ calledResult | number | Not required | Call result, 1 - connected, 2 - not connected | ||
├─ taskContactBatchName | string | Not required | Contact list name | ||
├─ callResult | number | Not required | Ring result |