Skip to content

First time TLS Certificate users

API Cloud provides you with API calls to manage certificates in Truststore. Follow these steps to consume the Trustore APIs.

Step 1: Register your Service Application with Trimble Cloud Console

To register your service application in Trimble Cloud Console:

  1. On the left pane select Identity Management > Applications.

  2. On the Applications home page, in the top right corner select + ADD APPLICATION. The Create Application page displays.

  3. In the Application Type section, select one of the following options:

    • Service Application A service application are intended to be used in programmatic workflows or server-server communication.
    • Application Refers to any Trimble application that is intended to be accessed by an end user.
  4. Select Continue to enter the applications details.

    FieldDescription
    Application EnvironmentSelect the environment that the applications must be registered to, Prod or Pre-Prod.
    NameVersion of the API published. The name of your client.
    Display NameProvide a display name of the application.
    DescriptionProvide a description for the application.
  5. Continue with completing the Configurations section. The fields that display depend on your selection in step 3.

    • For Service Application

      Service Application Grant types - Only Client Credentials Grant displays.

    • For Application

      FieldDescription
      Application Grant TypesSelect the grant types that will be used for authenticating users or applications.
      Allowed Callback URLSRefers to the redirect URI of the application after logging into Identity. More than one UL can be added to this field. The total URI length should not exceed 400kb. This field appears only when you select the Authorization Grant type.
      Allowed Logout URLSThe URIs that Identity can redirect to after log out. More than one UL can be added to this field. The total URI length should not exceed 400kb. This field appears only when you select the Authorization Grant type.
  6. Select COMPLETE to save changes.

You can view the application key and secret from the following:

Application quick view

Developer Marketplace

Step 2: Subscribe Service application to API Cloud Management API

To subscribe a service application to the API Cloud Management

  1. From the Trimble Cloud Console, on the left pane select Marketplace > Developer Marketplace.
  2. Search for and select the API Cloud Management API.

3. To subscribe your application with the API Cloud Management API, select the +ADD SUBSCRIPTION icon.

Step 3: Generate your access key

To generate an access key

  1. With the Application key & decret, generate base 64.

  2. Use the following cURLcall to generate the access token for your application.

    curl --location --request POST 'https://id.trimble.com/oauth/token' \
    --header 'Authorization: Basic {base64}' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'grant_type=client_credentials'
  3. Use the obtained key for invoking Trimble Developer APIs like the Truststore Management APIs.

Step 4: Upload CA certificate to Trustore

  • API CALL:

    POST https://cloud.api.trimble.com/core-console/1.0/publisher/truststores/environments/{ENV}/upload

  • HEADERS:

    – Accept: application/json

    This may be automatically added by your development tool. Postman and curl add this header to all requests.

    – Authorization: Bearer {bearer token}

    Include Trimble Identity OAuth Bearer token for your application (see get access token instructions for more information).

    – certFile: multipart/form-data holds the valid certificate file that needs to be updated either a single cert or one cert bundle (recommended certificate file in PEM format)

    – description: multipart/form-data

    • SAMPLE RESPONSE

        {
        "certId": "<TEAMNAME>_69c90453-7737-11eb-9c65-9791f75ef74a",
        "certsInfo": {
            "certInfo": [
                {
                   //certificate informations
                }
            ],
            "certName": "<TEAMNAME>_69c90453-7737-11eb-9c65-9791f75ef74a-cert"
        }
        }