Skip to content

WhatsApp API deleteMedia

CodingMakeWordBetter edited this page Oct 17, 2022 · 8 revisions

delete media files

Delete file information that has been uploaded to WhatsApp via API

  • URL:https://api2.nxcloud.com/api/wa/deleteMedia
  • Method:POST
  • Content-Type:applicatin/json
  • Authentication required:yes

Authentication mechanism

For authentication rules, please refer to the address:API interface calling convention

request parameters

header parameter:

**parameter ** type required example value illustrate
accessKey String Yes fme2na3kdi3ki User ID
ts String Yes 1655710885431 The timestamp of the current request (unit is milliseconds), the Niuxin server allows the client to request a maximum time error of 60 seconds
bizType String Yes 2 WhatsApp business type, fixed value "2"
action String Yes deleteMedia WhatsApp business operation, take the fixed value "deleteMedia"
sign String Yes 6e9506557d1f289501d333ee2c365826 API input parameter signature,,signature algorithm

body parameter:

parameter type required example illustrate
business_phone String Yes 86158xxxx1795 Merchant mobile phone number with country code. Such as 86158xxxx1795
messaging_product String Yes whatsapp The channel for sending messages, when applied to the sending of WhatsApp messages, the value must be "whatsapp"
Media-ID String Yes fd81acff-eea8-4d9d-acc9-6c62904d6615 Media file ID

Request example

body(application/json) parameters:

{
    "business_phone": "86158xxxx1795",
    "Media-ID": "fd81acff-eea8-4d9d-acc9-6c62904d6615",
    "messaging_product": "whatsapp"
}

response parameter

parameter type illustrate
code Integer result encoding
data JsonObject request result
message String Description of request result
  • data object parameter:
parameter type illustrate
success boolean success sign

Response example

Successful example

{
    "code": 0,
    "data": {
        "success": true,
    },
    "message": "请求成功"
}

Example of failure

{
    "code": -1,
    "message": "请求失败",
    "data": null
}

Response code description

code message Solution
0 request succeeded
-1 Request failed Please contact a technician to troubleshoot the problem
1000~100X Authentication problem For details, see the API Authentication section
9000 parameter exception Missing parameters, please check the required parameters
9001 System business error Please contact a technician to troubleshoot the problem
9002 Merchant phone number is wrong Please confirm if the merchant number is a whatsapp number
9006 The whatsapp number is not bound to the app Please contact the sales staff to handle the application and mobile phone number binding operation

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

AI Agent(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally