I have been experimenting with particle products, and I have reached a roadblock. I am trying to create customers from my web app (node.js), but I can find no documentation on how to do so. After about 2 hours of trial and error, I managed to create a customer via cURL:
curl -X POST -u pickle-xxxx:xxxxxxxxxxxxxxd9wd9asydu8 -d email=bob@gmail.com -d no_password=true https://api.particle.io/v1/products/{product_slug}/customers
This works fine, it returns the access token and everything. However, when I go to my particle console, click on the product, and click on customers, there are no customers there. Furthermore, I do not know how to view the customers via the API.
Can someone help me figure out how to register a customer with the javascript API, and make sure the customer actually exists?
Customers won’t appear in the console or the API until they claim a device. They exist in a state of limbo where they sort of exist (if you try to create the same customer email it will fail) but won’t show up anywhere. Just proceed to the next step and claim a device; if you succeed the customer was created successfully.
This document may be helpful in figuring out how all of the various pieces fit together. It walks through the process of manually claiming a Photon, both for a developer device and a product device.
Can any one answer this? Using the official Java Script SDK, what’s the suggested way to do this? It’s a necessary part of the process. Why is it missing from the SDK and documentation???