Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
You’re right to think that you can’t get the Teams cloud recording file during the meeting via a media bot, the media APIs only give you raw, real-time audio/video streams you’d have to stitch and store yourself. If what you want is the full meeting recording (the same one produced when someone clicks “Record” in Teams), one way to do it is through Microsoft Graph after the meeting ends.
At a high level, like Kudos-Ng said, you’d create the meeting with recordAutomatically: true so recording starts as soon as the meeting begins. Then subscribe to change notifications so your service knows when the recording is available. Once the meeting ends, your app can use Microsoft Graph to retrieve the recording either through the Get callRecording API (if available for your meeting type) or by accessing the file directly from OneDrive/SharePoint via the Graph Files API, depending on where Teams stored it. That way, Teams handles the media pipeline for you, and you just retrieve the final recording when it’s ready.
If you go the bot route, keep in mind that a media or ACS bot can only access raw media streams. You’d have to process and store those yourself, it won’t give you the packaged recording file automatically.
If you’re interested in actually building this out, you can either build one from scratch (there are some tutorials on how to build a MS teams bot for transcription which you can expand to your use case) or you can check out a third-party meeting bot API if you're interested in how to build a meeting bot step-by-step without the hassle of building one yourself. Building your own can be cool for a PoC, but is honestly such a slog when it comes to keeping it current. Both are good starting points whether you’re building the bot from scratch yourself or just want automated recording.