code-chat-br / whatsapp-api

CodeChat - WhatsApp Api

Home Page:https://docs.codechat.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File upload endpoint not working with base64

FelipeDeveloperFullStack opened this issue · comments

Hey guys

I'm trying to use the endpoint POST {{baseUrl}}/message/sendMedia/{{instance}}, but when passing the base64 of a .pdf file, it's not working. It's returning me the message: "Owned media must be a url".

What am I doing wrong? can anybody help me?

image
image

What is your api version?
If it is lower than v1.2.6, please update.

Access the route: http://localhost:8083/docs and correct your application.

@jrCleber

Thank you, it helped me a lot.

The version is the same, I had not updated it was the postman.json version, I updated it here and used the "/message/sendMediaFile" endpoint.

But, I don't know that I had the swagger by the "http://localhost:8083/docs" endpoint, they could later add it in the README.md it will help other devs, if not I can open a pull request to request this update. It will be very useful.

Thank you for your help.