Hi--I'm interested in logging to my external server when a device's SIM is activated or deactivated. I already have some integrations set up to log data from my devices via a webhook. Is it possible to do something similar with SIM-related events? If there's no event associated with the activation/deactivation of a SIM, I'd be interested in thoughts on the best way to keep my external database up to date with the current status of the SIMs attached to my devices.
Thanks for any help!
Best,
Lincoln @ QuantAQ
There is no event generated when a SIM is activated or deactivated.
Most products don't regularly activate and deactivate SIMs. They're activated when you add the device to a product, but you are not billed until the device first connects to the cloud so there isn't an advantage of fine-grained activation.
For products that have special requirements, such as seasonally active products, usually there's an external script or program for bulk activations and deactivations, so that can handle updating an external database if necessary.
Hi, I wonder if the API list-sim-cards could help:
List SIM cards for a product:
$ curl https://api.particle.io/v1/products/:productIdOrSlug/sims \
-H "Authorization: Bearer :access_token"