Files that you upload to a one-on-one or group chat are stored in your OneDrive for Business folder and are shared only with the people in that conversation.
Files that you upload to a channel are stored in your team's SharePoint folder. These files are available in the Files tab at the top of each channel
Retrieve a single message or a message reply in a channel or a chat.
GET https://graph.microsoft.com/v1.0/chats/19:8ea0e38b-efb3-4757-924a-5f94061cf8c2_97f62344-57dc-409c-88ad-c4af14xxxxx@unq.gbl.spaces/messages/161228999xxxx
Reference Doc-https://learn.microsoft.com/en-us/graph/api/chatmessage-get?view=graph-rest-1.0&tabs=http
To go from url to accessing and downloading it through Graph, you can use https://learn.microsoft.com/en-us/graph/api/shares-get?view=graph-rest-1.0&tabs=http