open-wa v5 is alpha. Use v4.76.0 for mature production systems unless you are validating v5.
The Client APIAPI ExplorerLicensing

Media Client API

Generated client method reference for the media namespace.

Client Media Methods Wally

Media Client API

Generated file warning: this page is generated by packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.

This page documents 2 schema-registry client methods in the media namespace.

decryptMedia

Decrypts media from a message

Overview

PropValue
Namespacemedia
Actionread
Functionalityboth
Positional parameter ordermessage
Aliasesmedia.decrypt
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/media/decryptdecryptMediaActive
AliasPOST/api/decryptMediadecryptMediaActive

Usage

const result = await client.decryptMedia({
  message: {},
});
const result = await client.media.decrypt({
  message: {},
});
curl -X POST "http://localhost:8080/api/media/decrypt" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "message": {}
  }'

Parameters

Prop

Type

Output

PropValue
Return typestring

downloadMedia

Downloads and decrypts media from a message to a file

Overview

PropValue
Namespacemedia
Actionread
Functionalityboth
Positional parameter ordermessage, path
Aliasesmedia.download
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPOST/api/media/downloaddownloadMediaActive
AliasPOST/api/downloadMediadownloadMediaActive

Usage

const result = await client.downloadMedia({
  message: {},
  path: "path",
});
const result = await client.media.download({
  message: {},
  path: "path",
});
curl -X POST "http://localhost:8080/api/media/download" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  --data '{
    "message": {},
    "path": "path"
  }'

Parameters

Prop

Type

Output

PropValue
Return typestring
Wally the Walrus typing

Was this helpful?

Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!

On this page