I'm trying to upload media to the google chat api, so I can use that media in my application later on using the attachmentDataRef. The documentation I followed is this: https://developers.google.com/chat/api/reference/rest/v1/media/upload
It is clear on the documentation that we need to send the file name that we want to upload together with the file itself, althought, when I tried to use this resource with postman I received the error:
{ "error": { "code": 400, "message": "Specify file name of the attachment to upload.", "status": "INVALID_ARGUMENT" } }
As you can see in the below image:
I placed the url mentioned on the documentation: POST https://chat.googleapis.com/upload/v1/{parent=spaces/*}/attachments:upload
Using the form-data body type, in order to send files and also strings, but I had no success using it.
How can I use this documentation properly ? I cant see what I am doing wrong here.