It's unfortunate that you can't create a permission request in the sidebar as the UX to get that permission will end up being pretty clunky.
A common flow on mobile is to show a prompt saying you need permission and a button saying "Request permission". Once that button is tapped, the system permission request dialog would appear. I think you may be able to adapt this flow to fit your needs.
While it's true that the sidepanel doesn't allow you to display permission prompts, you can open a new window with
type: "popup" (not the extension popup) and use that to initiate the permission request flow. In my testing just now I opened a popup by calling this block in the sidebar.
navigator.permissions.query({name: "microphone"}).then((res) => {
if (res.state == "prompt") {
chrome.windows.create({
url: "mic-permission-req.html",
type: "popup",
height: 200,
width: 300,
});
}
});
Then, in the popup's JS you can immediately call navigator.permissions.request({name: "microphone"}); to initiate the permission request flow. IMO it might be better to explain to use the prompt to explain that in order to do X the user will have to grant you extension microphone access, then initiate the permission request flow when the user clicks the "request" button. If the user has accidentally denied the permission, this approach also gives you the opportunity to explain the problem and to direct them to the extnesion's settings page to fix it (chrome://settings/content/siteDetails?site=chrome-extension%3A%2F%2FEXTENSION_ID%2F).