Share a scenario

Updated at:

This topic describes how to share a scenario with other users.

Prerequisites

You have built and saved a scenario. For more information, see Build a scenario.

Warning

Unauthorized disclosure of access links, passwords, or authentication tokens can create security risks and cause financial losses. Share access permissions with caution.

Enable access to a scenario

  1. In the scenario editing workbench, click the Share image icon on the right side of the top toolbar.

    Note

    If you are previewing the scenario, you can also click the Share image icon in the upper-right corner of the preview page to configure access permissions.

  2. In the dialog box that appears, you can view the external access status for the scenario.

    The Share IoT Digital Twin Scenario switch is off by default.

  3. Turn on the Share IoT Digital Twin Scenario switch to enable external access to the scenario.

    By default, the dialog box displays the link and password for external access. Click Copy Link and Password to share this information with other users.

  4. Click a tab under Access Restrictions to switch the access permission type.

    • Password + Token: Allows access with both a password and an authentication token. Users with whom you share the scenario can use either method to view it.

      The token-based access method is used for integration, which lets you embed the scenario page into your business system.

    • Token Only: Allows access only with an authentication token.

  5. Click the Close image..png icon in the upper-right corner of the dialog box.

(Optional) Update a password or reset a token

After you enable password or token authentication, you can perform the following operations:

Important

After you update a password or reset a token, the old credentials become invalid. Any active user sessions are immediately terminated. Users must use the new password or token to access the scenario again.

Operation

Procedure

Update access password

In the Access Restrictions area, under Access Password, click an icon to the right of the password field to modify, reset, or copy the password.

  • image (Modify): Follow the on-screen prompts to manually change the password.

  • image (Reset): IoT Platform assigns a new password.

  • image (Copy): Copy the password.

Reset token

In the Access Restrictions area, under Token Authentication, click an icon to the right of the token field to reset or copy the token.

  • image (Reset): IoT Platform assigns a new token.

  • image (Copy): Copy the token.

Other User Access Scenarios

Users who have the shared link can view the scenario. The steps to access the scenario depend on the enabled authentication method.

Using a password

  1. Open the shared link in a browser.

  2. Enter the access password.

  3. Click OK.

Using an authentication token

  1. Use the provided scenario link (original URL) and token to construct a new URL in the following format.

    ${originalURL}?signature=${signature}&timestamp=${timestamp}.

    Important
    • ${timestamp}: The current time in milliseconds. The value of timestamp in the URL must be the same as the value used for the signature calculation.

    • ${signature}: The signature string. Calculate the signature using the hmacmd5 signature algorithm with the expression hmac_md5(token, sceneId${sceneId}timestamp${timestamp}).

      • token: The value of the authentication token.

      • ${sceneId}: The ID of the scenario.

      You must implement the signature calculation function using a public library that supports the specified signature algorithm.

  2. Enter the new URL in a browser.

Other service access scenarios

IoT Digital Twin Component: A component for the IoT Platform application development service that you can use to display an IoT Digital Twin Engine scenario page in a web application.