Customer creation using JS API

Hello,

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?

Thanks,
Mike

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?

Thanks,
Mike

Great feedback! Seems like a missing feature to me. Mind filling it as a feature request over on Github?

2 Likes

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?

Mike

Hi @msn444

I am thinking that you might want to read the doc for the Particle console, which is a Particle front-end to manage devices, customers, fleets, etc.

https://docs.particle.io/guide/tools-and-features/console/

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.

Mike

Hey Mike.

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.

Cheers.
Monkey

Yeah I just ended up using the REST API. Is that what you did?

No, I added a function to the js api. To keep all the eggs in the same basket.

Cheers,
monkey.

Can you tell how one can use Photon of Particle’s Android SDK given in documentation https://docs.particle.io/reference/android/. It would be great help.

Hi @Amna

This is not my area, sorry. Perhaps @KyleG or @rickkas7 can point you in the right direction for Android SDK.

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)

2 Likes