feat: new media download way

This commit is contained in:
Anton Voylenko 2025-03-31 10:55:15 +03:00
commit 5869d86177
4 changed files with 173 additions and 2 deletions

View file

@ -8664,6 +8664,116 @@
}
}
},
"/message/downloadMediaAsData/{sessionId}": {
"post": {
"tags": [
"Message"
],
"summary": "Download attached message media as binary data",
"description": "",
"parameters": [
{
"name": "sessionId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "Unique identifier for the session (alphanumeric and - allowed)",
"example": "f8377d8d-a589-4242-9ba6-9486a04ef80c"
}
],
"responses": {
"200": {
"description": "Binary data."
},
"403": {
"description": "Forbidden.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenResponse"
}
}
}
},
"404": {
"description": "Not Found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundResponse"
}
}
}
},
"422": {
"description": "Unprocessable Entity.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Server failure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"security": [
{
"apiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"chatId": {
"type": "string",
"description": "The chat id which contains the message",
"example": "6281288888888@c.us"
},
"messageId": {
"type": "string",
"description": "Unique WhatsApp ID for the message",
"example": "ABCDEF999999999"
}
}
}
},
"application/xml": {
"schema": {
"type": "object",
"properties": {
"chatId": {
"type": "string",
"description": "The chat id which contains the message",
"example": "6281288888888@c.us"
},
"messageId": {
"type": "string",
"description": "Unique WhatsApp ID for the message",
"example": "ABCDEF999999999"
}
}
}
}
}
}
}
},
"/message/forward/{sessionId}": {
"post": {
"tags": [