Adding multiple product types to one user

Hi all,

We are working on a web app for our users. We have run into a snag with trying to add multiple different product types to a single user. A Boron and an Argon in this case. We can add both devices to our own accounts just fine but that seems to be because we have admin accounts. When trying to add multiple devices to a user account it says the user is “Not a customer of product #####.”

We tried a quick workaround of giving users an account for each product type but that seemed to run into issues with the access tokens.

If anyone has a simple way of achieving this let me know!

Thanks.

I’m not 100% sure of the exact problem, however the recommended solution is:

You should do user management from your webapp (or mobile app).

Avoid making Particle API calls from the browser Javascript (or mobile app).

Instead, make all Particle API calls from your back-end. Have your back-end determine what resources your customer has access to and gate the access from your back-end, not by creating separate Particle access tokens. This also can be where you determine which product(s) the user has access to.

1 Like