Authenticating applications

Developers using Live Sense SDK for Linux with their app are required to register for a set of HERE credentials and to specify these credentials in the SDK.

To obtain HERE credentials, visit the developer portal at and register for a license.


For the available authentication options, see the Identity & Access Management Developer Guide.

Once your project is created or if you already have a plan, get in touch with your Account Executive who will help you with the credentials.


  • Credentials are unique to your account and your application's package namespace. Avoid reusing credentials across multiple applications.

  • You cannot commercially release applications (for example, submit your application to a store) with a license key obtained as part of an Evaluation plan.

Once you receive the credentials, do the following:

  1. Add the credentials to your application
  2. Re-deploy your app

To contact us for more details, see Help.

Add credentials to the application

You can use the LivesenseEngine and AuthResponse classes to authenticate the SDK.

AuthResponse authResponse = LivesenseEngine::setAppCred("YOUR_APP_ID", "YOUR_APP_CODE", "YOUR_LICENSE_KEY");

Data is collected only from users who have agreed to their data being shared with HERE.

To obtain end-user consent for data usage and collection, use the ls::ConsentManager class after successful authentication.

The application is responsible for clearly presenting the end-user with the consent message and associated prompt to accept or decline data collection and sharing of that data with HERE.

The consent message presented to the end user will refer to a consent withdrawal mechanism, which must be implemented by the application to meet the requirements for a valid consent.

When the user gives a response, the application will inform Live Sense via ls::ConsentManager::setConsentResponse(bool). This method may be called again if the user decides to change their consent preference.

Below is an example of obtaining end-user consent in a console application.

auto manager = ls::ConsentManager::getInstance();
// Check if we need to request consent so to not ask user on every launch.
if (manager->needToRequestConsent()) {
    // Present consent message through console or GUI to end-user
    // HTML-formatted version of message also available
    std::cout << '\n'
              << manager->getConsentMessage() 
              << std::endl;
    // Prompt user for accept/decline
    while (true) {
        std::cout << "Do you accept? [Yes/No]: ";
        std::string line;
        if (!std::getline(std::cin, line)) {
            throw std::runtime_error("Unexpected input error");
        } else if (line.size() > 0 && line.find_first_of("YyNn") == 0) {
            // Tell Live Sense of response
            // The application is expected to provide an option in the settings
            // for a user to change their response after first prompt.
            bool response = (line[0] == 'Y' || line[0] == 'y');
            if (manager->setConsentResponse(response) == false) {
                // Error occurred when setting consent, check log
                std::cout << "Failed to set user consent" << std::endl;
                return 0;

After establishing this, you can start with the basic usage of the Live Sense in your app.

results matching ""

    No results matching ""