Register device by user via pressing button?

Hi, I’m consider the device registry for Google IOT core by the user.
Is there anyway to write javascript in MOS to register device?
Or there is only one way by using MOS command to register device before user got it?

  1. My goal is:
    Put the pub key to MOS and register device by java script running in MOS.

  2. My actions are: N/A

  3. The result I see is: N/A

  4. My expectation & question is: N/A

Thanks!

  1. How do you plan to setup networking (WiFi) when device is shipped to a user?
  2. Is your intention to register a device under user’s google account and hook it up to Google IoT ?

Hi,

  1. How do you plan to setup networking (WiFi) when device is shipped to a user?
    I consider linking the device to WIFI AP with the Android App with GATT RPC command.

  2. Is your intention to register a device under user’s google account and hook it up to Google IoT ?
    Yes. I think about the situation is user taking the device, downloading custom App, and then the device or the App have the permission to register device to Google IoT.

But I don’t know what is the popular mechanism the Vendor’s do?
I’m study for the registry by MOS or by Android App.
For MOS, Is MOS supporting functions to built in credentials or API key to do this?
OR peoples usually register the device in the Vendor side, just like factory?

Thank you!

I believe, the common way is to provision a device under yours (vendors) google iot account.
User might not even have a google login to begin with.