I am working with Power BI REST APIs to automate report sharing in my application. My goal is to generate a shareable link for a Power BI report, similar to the "Publish to Web" functionality, but programmatically using the API. Ideally, I want a link that can be shared publicly without requiring authentication, just like the manual "Publish to Web" links.
Note that: It is not possible to programmatically generate a public shareable link for a Power BI report that behaves exactly like the "Publish to Web" functionality using the Power BI REST API.
According to the Power BI community post referenced here, this functionality isn't exposed via the REST API, and the API does not offer an equivalent mechanism for securely sharing reports publicly without authentication.
Hence, you have to make use of Power BI Portal to perform the action like below:
For secure sharing with more control over access, consider using Power BI Embedded or sharing through the Power BI Service API for authenticated access.
You can find supported operations in below reference document: