Forum Discussion

EnTerr's avatar
EnTerr
Roku Guru
10 years ago

How persistent is GetPublisherId() ?

Reading this, it is unclear to me:
"GetPublisherId() as String" wrote:

Returns a unique identifier of the unit running the script. The string returned is a Universally Unique Identifier (UUID) as specified in IETF-RFC 4122 with 36 characters (32 alphanumeric characters and four hyphens). The characters are grouped in the form 8-4-4-4-12, for example "123e4567-e89b-12d3-a456-426655440000". This identifier is different across channels so each channel will get a different identifier when calling this function. This id is persistent and cannot be reset;

What does it mean by "persistent" there, what are the boundaries of it? Is said ID:
  • unique-per-install (i.e. uninstalling and re-installing on same device will change it)

  • unique-per-user (i.e. installing the same channel on all devices under same user account will return same ID)

  • unique-per-device (i.e. ID persists on this very device, even if factory reset and switched to a new user account)

3 Replies

  • The last one. The publisher ID is derived from the channel ID and the unit's serial number. So for a given channel and a given unit, it will never change.

    --Mark
  • Splendid, thank you. That line would be good to include in the doc.