I’m learning the ropes of Particle authentication in a node.js server environment. I understand that Customers can be created and assigned to a Product using the REST API, but I see no methods relating to Customers in the Particle JS API. Is the JS API not intended for this?
Anyone have any insight on this? It seems like a key function that needs to be part of the API. Do I have the wrong idea of what the JS API is for? Does anyone use it?
Sure… but I still don’t understand how it’s not there in the first place. In my mental model of the Particle cloud, its core purpose is to enable and manage devices that are to be used by customers, and transport data to customers. Of what use is the API if it doesn’t have a concept of customers?
Right, I get that the Console can do all that. But that doesn’t help in production when I want my customers to be able to sign themselves up through my web/mobile app, claim devices, etc. For that I need to call an API, and I would have assumed that the JS API would have that functionality. But it seems that the only way to do it is to use the REST API, which leads me to wonder what the JS API is useful for if it’s missing support for the key entity that we’re in this for: customers.
Just to let you know I had a bit of a play with this I think I’ve got it to work if it’s of interest still. Happy to share the (very modest amount of) code. I can make a push request, assuming I haven’t made too much of a mess.
To avoid scattering responses to one and the same question in multiple threads double posting is not appreciated in this forum - hence I closed this topic and the new discussion should continue on your other thread
(If the OP of this thread wants it reopened for the original discussion, just PM any of the mods)