Skip to content

Authentication

To securely access the Bühler Insights Platform API, you must authenticate your requests using an access token. This authentication method ensures that only authorized applications can interact with the API, protecting your data and maintaining the platform's integrity.

The access token must be included in the "Authorization" header of your API requests, using the "Bearer" prefix.

Example of a cURL request to the specified URL with a Bearer Authorization header:

curl -X GET https://api.buhlergroup.io -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

This would result with the following HTTP 1.1 request:

GET / HTTP/1.1  
Host: api.buhlergroup.io  
Authorization: Bearer YOUR_ACCESS_TOKEN

Authorization

Each clientId is linked to a single plant. To access data from multiple plants, request multiple access tokens, each corresponding to its clientId.

Client Credentials Grant Flow

To authenticate with the Bühler Insights Platform API as a service, you can use the OAuth 2.0 Client Credentials Grant Flow to obtain an access token. To use this flow, you need to request a clientId and a clientSecret from the Bühler Insights Support.

sequenceDiagram  
    participant Developer  
    participant Support as Bühler Insights<br>Support  
    participant Client as Client Application  
    participant AAD as Azure Active<br>Directory  
    participant BühlerInsightsAPI  

    Developer ->> Support: Request clientId and clientSecret  
    Support ->> Developer: Provide clientId and clientSecret  

    Developer ->> Client: Adds clientId, clientSecret, scope, and tenantId  

    loop Multiple API Requests  
        loop Refresh Token before expired  
            Client ->> AAD: Sends token request with clientId, clientSecret, scope, and tenantId  
            AAD ->> Client: Return access token  
        end  

        Client ->> BühlerInsightsAPI: Send API request with access token in Authorization header  
        BühlerInsightsAPI ->> Client: Return API response  
    end  

AAD Tenant Details

Enviornment TenantId ClientId ClientSecret Scope
UAT / Testing 8788d70f-c124-404f-ad73-367d4845779f Provided by support Provided by support https://buhleruatch.onmicrosoft.com/f6fb0d19-670b-463b-ae02-174deae3976a/.default
PREP ec64c433-1ee8-4dbd-837a-39f56c7cdcea Provided by support Provided by support https://buhlergroup.onmicrosoft.com/331c46f8-4e62-4bd2-838a-9a8fe5b2e468/.default
DEMO 457d6378-a484-4825-b24f-8ee32b9fe7b0 Provided by support Provided by support https://buhlerdemoch.onmicrosoft.com/5d7d5f95-0ecb-4637-a25a-897a81099488/.default
PROD ec64c433-1ee8-4dbd-837a-39f56c7cdcea Provided by support Provided by support https://buhlergroup.onmicrosoft.com/35046ed1-76e6-4dcd-a430-fa2ed6c23faf/.default