Set up your credentials

This section helps you to:

Get your credentials

You need to obtain and properly configure your credentials so that the OLP CLI can connect to the HERE platform.

Your credentials are used for authentication. The HERE platform uses the concept of apps and access keys to control the access to resources. For more details, see the Identity & Access Management Guide.

The credentials consist of the and here.access.key.secret contained in a file. You can download this file from the platform portal when creating an access key for an app (see the procedure below in the Credentials setup. The following snippet illustrates an example of a file: = HERE-01966c94-aaf1-4ae2-a1y6-6516b3f9b6c1 = mzLcb1rL8nskvDQpCAAO = BELUTk45QdaYGgZ9A_IMTA
here.access.key.secret = 108lI7w9m8G_6sIw9kng-PXGoeHQQ-cv6xByNOuMcRYixZZp...
here.token.endpoint.url =

Credentials setup

Follow the procedure below to configure your credentials:

  1. In the platform portal, in the upper-right corner, click your account icon and select Apps & keys.
  2. Click the Register new app button and specify the requested information.
  3. In the Credentials tab, go to the OAuth 2.0 tab and click Create credentials.
  4. In the dialog box that opens, click Download to download the file.

    Once you click Close, you can no longer access your access key ID and access key secret.

  5. To create a default profile and associate your credentials with it, run the following command:

     olp credentials import default
  6. To verify that your credentials have been correctly configured, execute the command below in the directory that contains the OLP CLI JAR file:

     olp api token get

An output similar to the one below is generated if your credentials have been configured properly:

Token: eyJhbGciOiJSUzUxMiIsImN0eSI6IkpXVCIsImlzcyI6IkhFUkUiLCJhaWQiOiJtekxjYjFyTDhuc2t2RFFwQ0ZFRiIs
Token Expires at: 2018-03-24T14:03:48.100Z

You can now use your credentials to connect to the HERE platform resources through the OLP CLI.


Storing your credentials

Keep your credentials private. Don't share them between workstations or users. Don't commit them to public repositories such as GitHub.

For more information on credentials configuration options, see Get your credentials.


The HERE platform uses OAuth2 scopes as a mechanism to control access to certain resources. Each of the OLP CLI commands that support scope resolves the scope to use in the request in the following priority order:

  1. --scope <project HRN>: An optional parameter that specifies the scope to use in the request.

  2. here.token.scope: An optional attribute to include in the credentials used for the request.

  3. Application default scope: If the client making the request has a default scope configured and neither of the above two parameters are present, the client's default scope will be used in the request.

  4. If a scope is not found in either of the above three locations, the request will not use any scope.


Credentials profiles allow you to define multiple profiles to use different credentials for different projects. You can use credentials profiles to manage and organize multiple app credentials from multiple files.

Profiles and the related credentials are stored in the .here/olpcli.ini file in your home directory. You can manage profiles with the credentials commands. The .here/olpcli.ini file is created after you add your first profile with the olp credentials import command, as described in the Setup section below

Pass credentials to the OLP CLI

The OLP CLI allows you to pass your credentials via optional parameters of the CLI commands or by setting environment variables. The OLP CLI resolves credentials in the following order:

  1. --credentials <path to credentials file>: An optional parameter that you append to the end of an applicable CLI command. This parameter specifies the path to the file to use with the command.

    For example, execute the command below:

        olp catalog layer show hrn:here:data::org:test-catalog test-layer --credentials

    This shows the properties of the test-layer layer if your credentials allow you to access the hrn:here:data::org:test-catalog catalog.

  2. OLP_CREDENTIALS: An environment variable that defines the path to the file used for all CLI commands by default.

  3. --profile <profile name>: An optional parameter that you append to the end of an applicable CLI command. This parameter specifies the name of the profile to use with the command.

    For example, the following command shows a list of catalogs accessible to the olp-user profile, including all the public HERE platform catalogs:

     olp catalog list --profile olp-user
  4. OLP_PROFILE: An environment variable that defines the name of the profile to use for all CLI commands by default.

  5. default profile: A profile that you create by running the command below:

     olp credentials import default
  6. default location: A path to the .here folder in your home directory where your credentials file is stored by default.


Some OLP CLI commands require that you specify a group ID. Your administrator must set up the relevant group IDs for your account and assign your application to the group. If your app is not assigned to a group, then the command produces an error. For more information on group IDs, see the Identity & Access Management Guide.

results matching ""

    No results matching ""