How did California join the US in the first place? It was part of Mexico. Under the Mexican constitution, the US had no right to take it.
California was an independent republic briefly before it joined the United States.
“Under the Mexican constitution, the US had no right to take it.”
Except the US didn’t “take” California. Mexico ceded their northern territories to the US in the treaty of Guadalupe - Hidalgo which ended the Mexican - American war -which was started by Mexico.