Set up and store BDP credentials securely so every guide and example in publish/ can run without rewriting setup steps.
- Portal access: UAT -
https://ecostruxure-building-platform-uat.se.app/ - Correct role: PartnerViewer/PartnerAdmin for consumer credentials, SourceAdmin for data source credentials
- Shell access: PowerShell, Bash, or equivalent
-
Identify which flow you are running.
- REST or GraphQL examples use
BDP_API_TOKEN. - Event Hub streaming examples use
BDP_EVENTHUB_CONNECTION_STRING. - DIF provider examples use
BDP_DIF_CONNECTION_STRING.
- REST or GraphQL examples use
-
Retrieve credentials from the portal.
Navigate the portal https://ecostruxure-building-platform-uat.se.app to retrieve credentials. Here is where to find each credential:
Credential Portal path Used by API token Credentials -> System -> API Token REST and GraphQL Event Hub connection string Partners -> your partner -> your consumer -> Event Hubs -> Primary Connection String Event Hub consumer IoT Hub connection string Data Sources -> your company -> your source -> Connections -> Primary Connection String DIF telemetry ingress -
Choose your preferred setup method.
You can use either shell environment variables or a local
.envfile. Use the method that best fits your workflow.-
Method A: Set environment variables in your shell.
$env:BDP_API_TOKEN = "eyJ..." $env:BDP_EVENTHUB_CONNECTION_STRING = "Endpoint=sb://...;EntityPath=..." $env:BDP_DIF_CONNECTION_STRING = "HostName=...;DeviceId=...;SharedAccessKey=..."
export BDP_API_TOKEN="eyJ..." export BDP_EVENTHUB_CONNECTION_STRING="Endpoint=sb://...;EntityPath=..." export BDP_DIF_CONNECTION_STRING="HostName=...;DeviceId=...;SharedAccessKey=..."
-
Method B: Use a local
.envfile (when provided by the example).
Copy
.env.templateto.env, fill values, and keep.envout of version control. -
-
Use your chosen method consistently for the session.
Avoid mixing partial values across methods in the same run.
-
Validate each credential, depending on your chosen flow, with the matching quick check.
- API token:
examples/graphql-quickstart-python/introspect.py - Event Hub:
examples/eventhub-consumer-python/consume.py - DIF ingress:
examples/dif-telemetry-python/send_telemetry.py --dry-run
- API token:
Tip
Having trouble with credentials? It is usually a configuration problem, not a code problem. If you are stuck, check the Troubleshooting. If that doesn't help, refer to the Support section to know how to reach us.
- Required environment variables are set for your chosen scenario.
- At least one scenario-specific credential check succeeds.
- Credentials are not hardcoded in scripts, command history snippets, or tracked files.
- Tokens are short-lived by design. If calls suddenly return
401, refresh the token from the portal and rerun. - Do not pass credentials as command-line arguments, arguments leak into shell history and process lists.
- Keep credentials out of logs and screenshots.
- If a credential is valid but no data arrives, check subscription rule and site authorization before debugging code.