google-api-nodejs-client icon indicating copy to clipboard operation
google-api-nodejs-client copied to clipboard

400 error at chat api media.download

Open agtx1 opened this issue 2 years ago • 0 comments

In the chat API, there is an error causing return of http 400 for any use of the media.download API.

Steps to reproduce:

  1. Get a valid resource ID for an uploaded attachment from chat.messages.attachment.get
  2. Feed into media.download API

I believe the error is due to a mistake in the URL. Per https://developers.google.com/chat/api/reference/rest/v1/media/download and https://developers.google.com/chat/how-tos/get-attachment it may need to have "?alt=media" appended to the end of the URL to support download.

agtx1 avatar May 06 '23 03:05 agtx1