unixcorn
unixcorn

Reputation: 440

getting a unique client id of a firefox addon

If there is a unique client id that is assigned to somebody who downloads my addon, how do I get it? I've tried Client.id which I found is experimental (https://developer.mozilla.org/en-US/docs/Web/API/Client/id). If there isn't a unique, stable client id that is assigned to my clients who downloads my addon, how do I assign them one?

Upvotes: 1

Views: 1133

Answers (1)

herodrigues
herodrigues

Reputation: 967

Use browser.runtime.id:

A string representing the add-on ID. If the extension specified an ID in its applications manifest.json key, runtime.id will contain that value. Otherwise, runtime.id will contain the ID that was generated for the extension.

Go to about:debugging and you will see the IDs of all your installed addons.

Upvotes: 0

Related Questions