BotFramework Get attachment API returns with 404 for previous images.

zhongwei_xu 21 Reputation points
2022-01-14T02:13:22.617+00:00

We are using Get attachment API to fetch the image uploaded from our user via bot.
Use case is like the following.
164994-%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2022-01-14-110710.png

The API reference is the following.
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0#get-attachment

But we found that for the images uploaded far than a month ago, the api return with 404.
For the image uploaded close to recently, for example images uploaded 2 days ago, the api returns with 200 and binary data.

The 404 case is the following.
164995-%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88-2022-01-14-110432.png

Is that Microsoft give some restriction for fetching image uploaded before a month ago? 2: /api/attachments/164992-スクリーンショット-2022-01-14-110432.png?platform=QnA

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,802 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,189 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.