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 fme2na3kdi3ki User ID
ts String 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 2 WhatsApp business type, fixed value "2"
action String deleteMedia WhatsApp business operation, take the fixed value "deleteMedia"
sign String 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
}

响应码说明

code message 解决办法
0 请求成功
-1 请求失败 请联系技术人员排除问题
1000~100X 鉴权问题 详情查看API鉴权部分
9000 参数异常 参数遗漏,请检查必须的参数
9001 系统业务错误 请联系技术人员排除问题
9002 商户手机号错误 请确认商户号码是否属于whatsapp号码
9006 该whatsapp号码未绑定应用 请联系业务人员处理应用和手机号绑定操作

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

AI Agent(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally