Gadget ID Requirements for Alexa Gadgets

A gadget ID is a unique string, or serial number, that identifies the gadget. The gadget ID is stored in the gadget firmware and might be etched on the gadget or marked on the packaging. If you reach out to us for support, we will likely ask you for the gadget ID of the gadget you use for development.

Other names for a gadget ID

The gadget ID is also called the following:

The gadget ID is not the same as the endpointId that the Endpoint Enumeration API returns, that you then use to send a custom directive to a specific gadget from an Alexa skill. This endpointId you get through the Endpoint Enumeration API is based on the gadget ID, but this endpointId is an opaque Alexa-generated string that internally maps a gadget ID to a directed endpoint ID. This way, skills can refer to gadgets without getting access to the real gadget ID or being able to infer the real gadget ID.

Gadget ID requirements

The gadget ID has the following requirements:

  • It must never change. After a gadget starts communicating with an Echo device, you should never change its gadget ID. Changing a gadget ID can cause connectivity problems.
  • It must be unique within a gadget product type. (The gadget product type is the gadget's Amazon ID, which you can view in the developer portal.) In other words, gadgets of the same type must have a unique ID.
  • It must be alphanumeric, and may contain dashes, periods or underscores.
  • It must be at least 6 characters.
  • It can't exceed 19 characters.
  • It must conform to the regex expression [a-zA-Z0-9][a-zA-Z0-9_.-]{5,18}
  • It must be readable by the gadget firmware at runtime, because the gadget uses the DSN to generate the Alexa.Discovery.Discover.Response and other gadget event messages.

How to choose a gadget ID

There are multiple ways to choose gadget IDs. For example, you can use a random number that you generate with sufficient entropy, or you can use a database to store all previously generated serial numbers and increment them each time you generate a new ID.

During development, it might be best to generate gadget IDs with a prefix, such as DEV, followed by the timestamp when the ID was generated.

Examples

The following table shows some example gadget IDs.

Gadget ID Description

DEV20201022-00001

ID generated with a DEV prefix and a daily counter.

DEV20201126174502

ID generated with a DEV prefix and a timestamp.

G090RD108032071X

ID generated based on a coded schema.