Skip to content

ADT User Account

Yuanhao Li edited this page Sep 28, 2023 · 14 revisions

Access ADT

Contact Tim Sibold tim.sibold@de.bosch.com if you have not done yet.

Your ADT User Account

You will receive an onboarding email. You will find the following information within this email, which are needed to use ADT:

  • Your email address, which is your account username.
  • Temp password. Please change it after receiving your first access token.
  • ADT app client ID, to request the Token for accessing the API
  • External ID, which is used for the cross account role accessing.

Generate Access Token and ID Token:

You will need an Access Token in order to change your password. You will need an ID Token for authenticating you requests in ADT.

Create file auth.json with the following content (or find a template in this repository):

{"AuthParameters" : {"USERNAME" : "<your-email>", "PASSWORD" : "<password>"}, "AuthFlow" : "USER_PASSWORD_AUTH", "ClientId" : "<client-id>"}

Run the following command in the location for the file:

curl -X POST --data @auth.json \
-H 'X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth' \
-H 'Content-Type: application/x-amz-json-1.1' \
https://cognito-idp.eu-central-1.amazonaws.com/

As a result you get the following output:

{
  "AuthenticationResult": {
    "AccessToken": "YourAccesTokeneyJraWQiOiJsT2NEb0V6ZWpOdThlZ1wva1NUNXZSWUNBSG5lO",
    "ExpiresIn": 86400,
    "IdToken": "YourIdTokeneyJraWQiOiJqRkh5b05MeWpxakVxWWJUUnlicStVYkF",
    "RefreshToken": "YourRefreshTokeneyJjdHkiOiJKV1QiLCJlbmMiOiJ",
    "TokenType": "Bearer"
  },
  "ChallengeParameters": {}
}

Change your password

Create a file named change-password.json (you can find template in this repository) with the following content:

{ "AccessToken": "string", "PreviousPassword": "string", "ProposedPassword": "string" }

Run the following command in the location of the newly created file:

curl -X POST --data @change_password.json \
-H 'X-Amz-Target: AWSCognitoIdentityProviderService.ChangePassword' \
-H 'Content-Type: application/x-amz-json-1.1' \
https://cognito-idp.eu-central-1.amazonaws.com/

After the password is changed you need to generate a new ID Token again as the old one is invalid.

Clone this wiki locally