The camera in the car with us is completely legal. But it must adhere to certain rules, such as locations outside the field of vision of the driver as shown below. Clean the glass first and then attach the suction cup or permanent.

For more details, refer to the following video: https://youtu.be/gkyN-xFOSKs