James K. Polk served as president of the United States during the Mexican War, and Texas gained independence as a result.
President Polk requests Congress to declare war on Mexico on May 11, 1846. On May 13, 1846, the US Congress formally declares war on Mexico. American troops occupy Matamoros on May 18, 1846. Battle of Monterrey, September 20–24, 1846. U.S. triumph.
The Americans launched an invasion of Mexico through Texas from the north, the port of Veracruz from the east, and the western border from the west. The majority of the credit for the Americans' victories in the war goes to their superior artillery.
To know more about Mexican War visit:-
https://brainly.com/question/28226005
#SPJ4