The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Terms of Use and Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
Insights Hub and Industrial IoT

Insights Hub drives smart manufacturing through the industrial Internet of Things. Gain actionable insights with asset and operational data and improve your processes.

Insights Hub Credentials¶

Introduction¶

The Insights Hub Credentials contain details for fetching new tokens and store fetched tokens.

Hint

Placeholders in the following samples are indicated by angular brackets < >.

Creating Credentials Objects¶

Object Name: MindsphereCredentials

Creating Credentials using a User Token¶

Applications can pass a user token which is obtained from the request header to clients using UserToken object as below:

credentials = UserToken(authorization="<user_token>")

Creating Credentials using App Specific Service Credentials¶

The app specific service credentials are obtained from Developer Cockpit or Operator Cockpit. During the development of an application you may provide the service credentials programmatically. The final application should obtain the client ID, client secret, app name and app version from the environment variables and the host tenant and user tenant from the user token.

Provide app specific service credentials using the AppCredentials object to obtain technical tokens:

credentials = AppCredentials(
    app_name="<app_name>",
    app_version="<app_version>",
    host_tenant="<host_tenant>",
    user_tenant="<user_tenant>",
    key_store_client_id="<client_id>",
    key_store_client_secret="<client_secret>",
)

Creating Credentials using Tenant Specific Service Credentials¶

The tenant specific service credentials must be provided programmatically or via environment variables. Tenant specific Service Credentials are obtained as described in Accessing Industrial IoT APIs with Service Credentials.

Provide tenant specific service credentials using the TenantCredentials object to obtain technical tokens:

credentials = TenantCredentials(
    client_id="<client_id>",
    client_secret="<client_secret>",
    tenant="<tenant>"
)

Creating Credentials using Tenant specific Service Credentials for Subtenant Impersonation¶

The tenant specific service credentials for subtenant impersonation must be provided programmatically or via environment variables.

Provide tenant specific service credentials for subtenant impersonation using the TenantCredentials object to obtain technical tokens:

credentials = TenantCredentials(
    client_id="<client_id>",
    client_secret="<client_secret>",
    tenant="<tenant>",
    sub_tenant="<subtenant>"
)