{// External embed user ID. IDs are not shared with regular users. Required"external_user_id":"user1",// First and last name. Optional"first_name":"Pat","last_name":"Embed",// Duration before session expires, in seconds. Required."session_length":3600,// Enforce logging in with these permissions. Recommended."force_logout_login":true,// External embed group ID. Optional."external_group_id":"group1",// Looker Group IDs. Optional"group_ids":[],// Permissions. See documentation for details. Required.// Can any combination of:// access_data// see_looks// see_user_dashboards// see_lookml_dashboards// explore// create_table_calculations// download_with_limit// download_without_limit// see_drill_overlay// see_sql// save_content// embed_browse_spaces// schedule_look_emails// send_to_sftp// send_to_s3// send_outgoing_webhook// schedule_external_look_emails"permissions":["access_data","see_looks","see_user_dashboards","explore","save_content","embed_browse_spaces"],// Model access permissions. Required."models":["powered_by","thelook"],// User attributes. Optional."user_attributes":{"locale":"en_US"},}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[],[],null,["# Embed SDK Demo\n\nThe Looker [Embed SDK repository](https://github.com/looker-open-source/embed-sdk) includes sample code and a demo of the Embed SDK. Because of Looker's security requirements, the demo requires a bit of setup. The demo also requires your Looker [embed secret](/looker/docs/admin-panel-platform-embed#embed_secret). The embed secret grants access to all of your data, so note the following:\n\n- Don't share your secret with anyone whom you don't want to have complete access to your instance.\n- Don't reset your secret if you already are using it in another context.\n- Don't set up your code to store the secret in the web browser.\n\nStep 1: Enable embedding in your Looker instance\n------------------------------------------------\n\nThis is documented in more detail on the [Signed embedding](/looker/docs/single-sign-on-embedding) documentation page.\n\n1. Navigate to **Admin \\\u003e Platform Embed** on your Looker instance. This requires Admin privileges.\n2. The demo server runs by default at `http://localhost:8080`. By adding that address to the [**Embedded Domain Allowlist**](/looker/docs/admin-panel-platform-embed#embedded_domain_allowlist), you can enable the demo to receive messages from Looker.\n3. Turn on **Embed Authentication**.\n4. In order to view your embed secret you must reset it. Copy the secret to a secure place.\n\nStep 2: Customize the demo settings for your Looker instance\n------------------------------------------------------------\n\nProvide your embed secret to the server. You can do this in the following ways:\n\n- Set it as `LOOKER_EMBED_SECRET` in your shell environment.\n- Create a file named `.env` in the root of the sdk directory. Add a line to that file: `LOOKER_EMBED_SECRET=\"YourLookerSecret\"`\n\nProvide your Looker instance host address to the server by using one of the following methods:\n\n- Set it as `LOOKER_WEB_URL` in your shell environment.\n- Add `LOOKER_WEB_URL=\"yourinstance.looker.com:yourport\"` to the `.env` file.\n\n| **Note:** The existing environment variable `LOOKER_EMBED_HOST` can also be used instead of `LOOKER_WEB_URL`.\n\nEdit the ENV file to specify the IDs of the content that you want to embed. \n\n # Looker Embed Data Configuration\n # Set to - if demo needs to ignore it\n\n # Dashboard IDs\n LOOKER_DASHBOARD_ID=1\n LOOKER_DASHBOARD_ID_2=2\n # Look ID\n LOOKER_LOOK_ID=1\n # Explore ID\n LOOKER_EXPLORE_ID=model::explore\n # Extension ID\n LOOKER_EXTENSION_ID=extension::my-great-extension\n # Report ID\n LOOKER_REPORT_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\n # Query Visualization ID\n LOOKER_QUERY_VISUALIZATION_ID=1234567890ABCDEF123456\n\nEdit the `demo/demo_user.json` file to be appropriate for the type of user you want to embed. \n\n {\n // External embed user ID. IDs are not shared with regular users. Required\n \"external_user_id\": \"user1\",\n // First and last name. Optional\n \"first_name\": \"Pat\",\n \"last_name\": \"Embed\",\n // Duration before session expires, in seconds. Required.\n \"session_length\": 3600,\n // Enforce logging in with these permissions. Recommended.\n \"force_logout_login\": true,\n // External embed group ID. Optional.\n \"external_group_id\": \"group1\",\n // Looker Group IDs. Optional\n \"group_ids\": [],\n // Permissions. See documentation for details. Required.\n // Can any combination of:\n // access_data\n // see_looks\n // see_user_dashboards\n // see_lookml_dashboards\n // explore\n // create_table_calculations\n // download_with_limit\n // download_without_limit\n // see_drill_overlay\n // see_sql\n // save_content\n // embed_browse_spaces\n // schedule_look_emails\n // send_to_sftp\n // send_to_s3\n // send_outgoing_webhook\n // schedule_external_look_emails\n \"permissions\": [\n \"access_data\",\n \"see_looks\",\n \"see_user_dashboards\",\n \"explore\",\n \"save_content\",\n \"embed_browse_spaces\"\n ],\n // Model access permissions. Required.\n \"models\": [\"powered_by\", \"thelook\"],\n // User attributes. Optional.\n \"user_attributes\": { \"locale\": \"en_US\" },\n }\n\nStep 3: Build and run the demo\n------------------------------\n\nTo build and run the demo, follow the steps for the appropriate server.\n\n### Node server\n\n1. Run `npm install`\n2. Run `npm start`\n\nThe server will print out what host and port it is running on. If it is different than `http://localhost:8080` then you will need to add it to your [**Embedded Domain Allowlist**](/looker/docs/admin-panel-platform-embed#embedded_domain_allowlist).\n\n### Python server\n\n1. Run `npm install`\n2. Run `npm run python`\n\nThe server will print out what host and port it is running on.\n\nYou may need to `pip install six` to install the Python 2/3 compatibility layer."]]