How did the United States acquire West Florida

Answer:
In 1819, after years of negotiations, Secretary of State John Quincy Adams achieved a diplomatic coup with the signing of the Florida Purchase Treaty, which officially put Florida into U.S. hands at no cost beyond the U.S. assumption of some $5 million of claims by U.S. citizens against Spain.
so your answer is the united states acquired florida during the war of 1812