setSmartMachineCredentials method

Future<void> setSmartMachineCredentials({
  1. required String id,
  2. required String secret,
  3. String appAddress = 'https://app.viam.com:443',
})

Set the Viam credentials of the smart machine, so it can connect to the Cloud.

id is the RobotPart id secret is the RobotPart secret appAddress is the cloud address that the robot will authenticate against

Implementation

Future<void> setSmartMachineCredentials({
  required String id,
  required String secret,
  String appAddress = 'https://app.viam.com:443',
}) async {
  final cloud = CloudConfig(id: id, secret: secret, appAddress: appAddress);
  final request = SetSmartMachineCredentialsRequest(cloud: cloud);
  await _client.setSmartMachineCredentials(request);
}