Embed report using embed secret key
To render a Bold Reports® report in your web application with single sign-on (SSO), you frame the embed URL using the embed secret key.
How do I get the embed secret key?
You generate the embed secret key on the Bold Reports® Report Server Embed settings page. Follow these steps:
- Go to the settings page and click
Embed. - On that page, enable the Enable embed authentication option.

- Click the
Generate Secretbutton.
- The secret key is generated. Save the secret key safely, because you cannot retrieve or restore the generated secret after it is created.

- After the secret key is generated, you can reset it by clicking the
Reset Secretbutton.
Resetting this code will break the previously functioning embedded reports.
What is the embed URL format?
A Bold Reports® embed URL signed with the secret key uses the following format:
{report URL}?{embed parameters}&embed_signature={signature}
|
Example: |
The following table describes the parts of the URL.
| Parameter | Description |
|---|---|
| report URL | URL of the report to be embedded. |
| embed parameters | Parameters required to embedding the report with SSO. |
| signature | Authorized key for the report to be embedded. |
Parameters to generate the signature in the embed URL
Bold Reports® Report Server needs the following values to form the embed signature.
| Parameter | Mandatory | Description | Example |
|---|---|---|---|
|
|
Yes | A random string serves to restrict the URL reconstruction or attacks from the hackers. |
|
|
|
Yes | The email address of the user. | |
|
|
No | Use this value to check the views in the embedded report. | true |
|
|
No | This value enables you to perform actions such as saving a view, updating a view, and deleting views in the embedded report. | true |
|
|
No | The export option for various formats of the report in the embedded report is displayed based on this value. | true |
|
|
No | Actions related to comments, such as post, edit, delete, reply, watch, unwatch, posting the image and user mention list options can be performed in report based on this value. | true |
|
|
Yes | The current time is represented as a UNIX timestamp. The embedded URL that is formed will be valid for 5 minutes from this embed timestamp. |
|
|
|
No | Set the duration for the token to remain active. It must be represented in seconds. The default time is 86400 seconds, and the maximum is 604800 seconds. |
|
|
|
No | Passes custom attributes to the report. The value must be a Base64-encoded JSON object. Custom attributes can be accessed in report expressions at runtime. |
Custom Attribute JSON (Base64 Encoded) |
|
|
No | Passes report parameter values to the report. The value must be a Base64-encoded JSON array containing the report parameter definitions and values. |
Report Parameter JSON (Base64 Encoded) |
Extended Attribute Example
The extended_attribute value in a Bold Reports® embed URL is a Base64-encoded JSON object, as in this example.
JSON:
{"AttributeName":"value1","attributeName2":"value2"}Equivalent Base64 value:
eyJBdHRyaWJ1dGVOYW1lIjoidmFsdWUxIiwiYXR0cmlidXRlTmFtZTIiOiJ2YWx1ZTIifQ==Parameter Example
The parameter value in a Bold Reports® embed URL is a Base64-encoded JSON array of report parameter definitions and values, as in this example.
JSON:
[{"name": "SalesOrderNumber","labels": ["SO50752"],"prompt": "Sales Order No:","values": ["SO50752"],"nullable": false}]Equivalent Base64 value:
W3sibmFtZSI6ICJTYWxlc09yZGVyTnVtYmVyIiwibGFiZWxzIjogWyJTTzUwNzUyIl0sInByb21wdCI6ICJTYWxlcyBPcmRlciBObzoiLCJ2YWx1ZXMiOiBbIlNPNTA3NTIiXSwibnVsbGFibGUiOiBmYWxzZX1dGenerating the signature for the embed URL
Bold Reports® Report Server authenticates the embedded URL with the embed_signature value, described in the following table.
|
|
Yes | A signature is generated using the secret code to authenticate the embedded URL. |
|
Form the embed parameter in the following format.
|
|
The embed parameter formed above is signed with the secret code generated on the Bold Reports® server using the HMACSHA256 algorithm. The resulting signed key is appended to the embed URL as embed_signature.
Sample to Embed Report Using SSO Authentication
You can download a Bold Reports® sample that embeds a report using SSO authentication from the Syncfusion® download page.
Frequently asked questions
Can I recover a lost embed secret key?
No. You cannot retrieve or restore the generated secret after it is created. You can reset it with the Reset Secret button, but resetting breaks previously functioning embedded reports.
How long is a signed embed URL valid?
The embedded URL is valid for 5 minutes from the embed_timestamp value.
Which algorithm signs the embed parameters?
The embed parameters are signed with the secret code using the HMACSHA256 algorithm.