Batch adding devices to product

We’ll soon start using the Product features in the Particle platform. If we add devices one by one, we can set a friendly name for each device. If we add them as a batch (as shown here) - how can we add the name?

The rename a device API can be used to set the name of a device:

You can also click on a device and then the Edit button to change the name of a device from a product manually.

It would be a straightforward node.js script to take say a csv file containing the device ID and device names, add the device IDs to a product, then rename each of the devices based on the file, but I don’t actually have that script written.


But wouldn’t I need the access token for each device also?

Good question. I just double-checked and once you add a device ID to a product you can rename it with a product bearer token, so you don’t need a customer-specific token to rename (for product devices).

1 Like