Upload de mídia.

É possível carregar, recuperar ou excluir mídias. Carregue as arquivos de midia para que possam ser usados no endpoint api/Messages. Para tal, faça uma requisição POST para o endpoint api/Medias.

Exemplo:

curl --request POST \
  --url https://api-cerberus-kong.socialminer.tech/api/Medias/ \
  --header 'Content-Type: multipart/form-data' \
  --header 'apikey: {APIKEY}' \
  --header 'version: 6.0' \
  --form messaging_product = whatsapp \
  --form 'File=@D:\Users\user\Pictures\Net.jpeg'

Caso ocorra com sucesso, uma resposta será recebida conforme abaixo com o http status 200:

{
	"id": "515056594160172"
}

Tipos de mídia suportados

MídiaTipos de arquivo suportadosLimite de tamanho
audio
  • audio/aac
  • audio/mp4
  • audio/mpeg
  • audio/amr
  • audio/ogg

Note: only opus codecs, base audio/ogg is not supported
16MB
document
  • text/plain
  • application/pdf
  • application/vnd.ms-powerpoint
  • application/msword
  • application/vnd.ms-excel
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
100MB
image
  • image/jpeg
  • image/png
5MB
sticker
  • image/webp
100KB
video
  • video/mp4
  • video/3sp

Observações:
  • Apenas H. 264 codec de vídeo e codec de áudio AAC são suportados.
  • Suportamos vídeos com um único fluxo de áudio ou sem fluxo de áudio.
    16MB
    Recent Requests
    Log in to see full request history
    TimeStatusUser Agent
    Retrieving recent requests…
    LoadingLoading…
    Query Params
    string

    Identificador do telefone da WABA na Meta.

    Body Params
    file
    string
    Headers
    string

    Gateway: usuário.

    string

    Gateway: grupo de origem.

    string

    Gateway: chave de acesso.

    string
    Defaults to 6
    string
    enum
    Defaults to application/json

    Generated from available response content types

    Allowed:
    Responses

    Language
    LoadingLoading…
    Response
    Click Try It! to start a request and see the response here! Or choose an example:
    text/plain
    application/json
    text/json