Authentication¶
Authentication is handled using OAuth 2.0 Client Credentials Grant.
Token URLs:
| Environment | Endpoint URL | 
|---|---|
| Test: | https://sfs-q-001.siemens-sfs.auth0app.com/oauth/token | 
| Live (Production) | https://sfs-p-001.siemens-sfs.auth0app.com/oauth/token | 
API Audiences:
| Environment | Audience | 
|---|---|
| Test | https://api.siesmart.com/b2b | 
| Production | https://api.siesmart.com/b2b | 
Retrieve an access token¶
To be able to make any API calls, you will need to generate an access token:
POST {TOKEN_URL}
Content-Type: application/json
{
  "audience": "{API_AUDIENCE}",
  "grant_type": "client_credentials",
  "client_id": "{YOUR_CLIENT_ID}",
  "client_secret": "{YOUR_CLIENT_SECRET}"
}
A successful authorization request results in a response like the following:
HTTP/1.1 200 OK
Content-Type: application/json
{
  "access_token": "eyJz93a...k4laUWw",
  "token_type": "Bearer",
  "expires_in": 86400
}
The field access_token contains the token which you use for performing requests to our APIs.
Hint
Tokens are valid for 12 hours so can be cached on your system. Please avoid a set-up that generates a new token for each request.