Claim ownership of a device

The end user controls the device and can access data created by the device in HERE Tracking. To enable this, the device needs to be claimed by the user. Only claimed devices can send and store data in HERE Tracking.

In HERE Tracking, an end user who claimed a device, is often referred to as the device owner. The device owner is a different from the device vendor.

Claim a device to a project

Prerequisites:

  • A valid Device License of a device that has not been claimed yet
  • A valid HERE account user (who is also a member of a HERE Tracking project)

Log the user in

curl -X POST \
  https://tracking.api.here.com/users/v2/login \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "{userEmail}",
    "password": "{userPassword}"
}'

This will return a user access token: accessToken.

Add the device to the user project

If the user is a member of multiple projects, the target Project ID needs to be specified in the projectId query parameter (note that this is different from the projectAppId). One only needs deviceId, but not deviceSecret for claiming a device.

curl -X PUT \
  https://tracking.api.here.com/registry/v2/devices/{deviceId}?projectId=`projectId` \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'Content-Type: application/json'

This will return a newly created trackingId. This is a unique identifier associated with the device data in HERE Tracking.

NOTE: trackingId is different from the deviceId used in the license. The deviceId is permanently associated with the hardware, and the trackingId is associated with the device data. If the device is later sold or transferred, the deviceId remains the same but the trackingId changes when the device is reclaimed. This way the new owner cannot access the old data.

Verify the device is in the user's list of devices

If the user is a member of multiple projects, the target Project ID needs to be specified in the projectId query parameter (note that this is different from the projectAppId).

curl -X GET \
  https://tracking.api.here.com/users/v2/devices?projectId=`projectId` \
  -H 'Authorization: Bearer {accessToken}'

This will list all the devices claimed by a user project identified by the projectId.

results matching ""

    No results matching ""