forked from nxtele/http-api-document
-
Notifications
You must be signed in to change notification settings - Fork 1
WhatsApp API uploadTemplateFile
CodingMakeWordBetter edited this page Jun 14, 2023
·
2 revisions
Upload media files for configuring template examples. Media files are uploaded via HTTP multipart/form-data.
- URL:
https://api2.nxcloud.com/api/wa/uploadTemplateFile - Method:
POST - Content-Type:
multipart/form-data - Requires authentication: Yes
Refer to the following address for authentication rules: API Interface Call Convention
| Parameter Name | Type | Required | Example Value | Description |
|---|---|---|---|---|
| accessKey | String | Yes | fmexxx3ki | User identity identifier |
| ts | String | Yes | 1655710885431 | Current timestamp of the request in milliseconds. The maximum allowable time difference between the server and the user is 60 seconds. |
| bizType | String | Yes | 2 | WhatsApp business type, fixed value "2" |
| action | String | Yes | uploadTemplateFile | WhatsApp business operation, fixed value "uploadTemplateFile" |
| sign | String | Yes | 6e95xxx826 | API input parameter signature, signature algorithm |
| Parameter Name | Type | Required | Example Value | Description |
|---|---|---|---|---|
| business_phone | String | Yes | 86158xxx1795 | List of merchant's WhatsApp numbers, including country code, such as 185xxx99 |
| messaging_product | String | Yes | Channel for sending messages. When sending WhatsApp messages, the value must be "whatsapp" | |
| file | file | Yes | Local directory where the file is stored. Example: "@/local/path/file.jpg" | |
| type | String | Yes | image/jpeg | File type Supported: application/pdf, video/mp4, image/jpeg, image/png, image/jpg |
Body (multipart/form-data) parameters:
messaging_product = whatsapp
business_phone = 185xxx99
type = image/jpeg
file =
| Parameter Name | Type | Description |
|---|---|---|
| code | Integer | Result code |
| data | JsonObject | Request result |
| message | String | Description of the request result |
- data object parameters:
| Parameter Name | Type | Description |
|---|---|---|
| id | String | System-generated unique file ID |
{
"code": 0,
"data": {
"id": "4:Pz8xxxW8"
},
"message": "Request successful"
}{
"code": -1,
"message": "Request failed",
"data": null
}| code | message | Solution |
|---|---|---|
| 0 | Request successful | |
| -1 | Request failed | Please contact technical support to troubleshoot the issue. |
| 1000~100X | Authentication issue | Refer to the API authentication section for details. |
| 9000 | Parameter exception | Missing parameters, please check the required parameters. |
| 9001 | System business error | Please contact technical support to troubleshoot the issue. |
| 9002 | Merchant phone number error | Please confirm whether the merchant number belongs to a WhatsApp number. |
| 9006 | The WhatsApp number is not bound to the application | Please contact the business personnel to handle the binding operation between the application and the phone number. |
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
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号码
通用
号码检测