Created a PHP application for achieving this embedding. Here, set the server and dashboard details as the embed details, and the dashboard will be rendered after passing the authorization.
NOTE: Reading the Getting Started section of the documentation is the best way to get started. The Getting Started guide provides you enough information that you need to know before working on the sample.
Please download the PHP Core sample from provided link.
Index.php, you must set your server details to EmbedProperties as follows.
AuthorizeServer.php, you must set UserEmail and Embed Secret key, which has been used for creating embed signature to get authorize the server from PHP sample. Learn more about authorize server here.
Set the following properties in both files.
|ServerUrl||Dashboard Server BI URL Enterprise Edition- http://localhost:5000/bi/site/site1 Cloud -http://dashboard.syncfusion.com/bi|
|DashboardPath||Set the dashboard path by category name following by dashboard name.
|AuthorizeServerURL||URL pointing to AuthorizeServer API file. We have running PHP sample in 8080 port.
|UserEmail||UserEmail of the Admin in your Bold BI, which will be used to access the widgets of the dashboard.|
|EmbedSecret||You can get your EmbedSecret key from embed tab by enabling
You can get your Embed Secret key from the administrator setting section. Please refer to this link, for more details.
You can render the dashboard by passing the Dashboard path or Dashboard id.
Then, run your PHP Core sample.
When you embed a dashboard to render, you will authorize the server URL by calling the GetEmbedDetails function by API call with provided EmbedProperties values.
In above authorization, generated the SignatureUrl with the provided EmbedSecret key and validate the embed details in Bold BI. Then only the embedded widget will be rendered in
Index.php, we have initialized the dashboard from the Sales Performance. You can change the dashboard path according to the dashboard you wish to embed.