Method to share Spark Core with multiple users?

Hi,

Did not see any topics or documentation related to this…

Is there a way that multiple users (multiple logins) can share a single Core? The use case I have is for a Core-based IoT device used within the home, where multiple users (Mom, Dad, Kid 1, etc) want to connect to, control, and view the status of the IoT device, using their own credentials to do so.

Thanks,
Mike

You could have one “master account”, and then several “user accounts”. The master account is the one who actually owns the Core. You could then make multiple accesstokens, and assign them to your users. That’d require your application to do the user management though. I believe there are plans for making situations like this easier in the future.
Perhaps @Dave can comment on this?

I had a feeling that might be the case… that my application would need to manage the multiple users. Would be great if it could be made easier in the future… I suspect the use case would become relatively common.

Thanks for the response!

2 Likes

Hi @nachtritter,

Interesting idea! One approach we had for this was accessTokens with different permissions levels, so your one user could create several tokens, two with full control, and one with limited (read-only) control, etc. We’re hoping to extend access tokens with these properties in the coming months. :slight_smile:

I hope that helps!

Thanks,
David

1 Like

This would be great. It would be especially interesting if a “master user” could create tokens that had access to a sub-set of the cores on their account. That would make bootstrapping a multi-user product/application super easy.

1 Like

Hi Dave, I searched for “create user Particle” and the most relevant results seems to be this one: https://docs.particle.io/reference/javascript/#create-user

That requires having the Javascript SDK though. Is there another method? Thanks!

Hi @yoohsiu,

It sounds like you’re asking what API endpoint to hit when registering a new user:

That SDK is just sending a post request to /v1/users with the username / password, so you can do that from anything that can send a web request.

I hope that helps!

Thanks,
David

Thanks! I was clicking through the Particle console and found the “product” option. What is the different between adding a “user” via the method above, vs creating a product and then adding a “team member”? Do both get access to edit code?

Thank you,
Yoo-Yoo

Hi @yoohsiu,

Good question! A Team Member has access to a product as a product creator. They can add firmware, change settings, import devices, etc. Right now only a single “end-user” can claim a device, but many product-creators can manage a product.

Thanks,
David

Cool thanks! - sounds like I want to use the team feature. I added a team member, but he can’t see my code. Is there a way to share the code directly, and not just the binary?

Sharing like that isn’t implemented, though you can use the new snapshot feature.
Alternatively, setup Dev and use something like GitHub/dropbox to sync your files?

3 Likes