Credentials Setup

HERE Workspace credentials are required in order to use the Data SDK for Python. You can provide your credentials using any of the following methods:

  • Default credentials
  • Environment variables
  • Credentials file

Default Credentials

  1. Go to HERE Platform Applications and Keys and register a new app.
  2. Create a key for the app and download the generated credentials.properties file.
  3. Place the credentials file into:

    For Linux/MacOS: $HOME/.here/credentials.properties

    For Windows: %USERPROFILE%\.here\credentials.properties

The HERE platform generated app credentials should look similar to the example below:

here.user.id = <example_here>
here.client.id = <example_here>
here.access.key.id = <example_here>
here.access.key.secret = <example_here>
here.token.endpoint.url = <example_here>

Note

For additional information about authentication credentials, see the Identity & Access Management Guide.

Environment Variables

You can override default credentials by assigning values to the following environment variables:

HERE_USER_ID
HERE_CLIENT_ID
HERE_ACCESS_KEY_ID
HERE_ACCESS_KEY_SECRET
HERE_TOKEN_ENDPOINT_URL

Variable name: HERE_TOKEN_ENDPOINT_URL is optional.

Code snippet: platform_cred = PlatformCredentials.from_env()

Credentials File

You can specify any credentials file as an alternative to that found in .here/credentials.properties. An error is generated if there is no file present at the path, or if the file is not properly formatted.

Code Snippet:

platform_cred = PlatformCredentials.from_credentials_file(“<Path_to_file>”)
        platform_obj = Platform(platform_cred)

results matching ""

    No results matching ""