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
Electrification X
This API is an addon to Electrification X.

Electrification X® combines the real and digital worlds in the Xcelerator IoT Software as a Service (SaaS) offering for Electrification & Automation to tackle the challenges of energy transition.

Getting Started

Getting started with using Electrification X APIs involves the following steps:

  1. Get credentials for authorization
  2. Create a JSON Web Token (JWT) by using the credentials
  3. Make API requests using the JWT

Get credentials

Contact your company administrator. Your company administrator will provide you with the following credentials:

  • Client id
  • Client secret

Create a token

For the Electrification X API you need a client id and a client secret to get an access token.

Example request

import requests

def authenticate(client_id: str, client_secret: str) -> str:
    response = requests.post('https://siemens-bt-015.eu.auth0.com/oauth/token', payload={
        'client_id': client_id,
        'client_secret': client_secret,
        'audience': 'https://horizon.siemens.com',
        'grant_type': 'client_credentials',
    })
    response.raise_for_status()
    message = reponse.json()
    return message['access_token']

Example response

{
  "access_token": "eyJ0eXAiOiUSJ9.eyJpc3MiOiJdGlhbHMifQ.MJpcxLfyOt",
  "token_type": "Bearer",
  "expires_in": 86400
}

The access token is a JWT (JSON Web Token). It is the value of the access_token-property in the response. You can now use it by passing it in the Authorization-header of any subsequent API requests. The expires_in-property represents the number of seconds your token is valid. Usually, the value corresponds to 24 hours. When this time has elapsed you will need to create a new token.