He was appointed by President James Madison to the Diplomatic Service in France in 1811. He transferred to England, where he was Chargé d'Affaires when war was declared by the United States in 1812. He was Minister to Sweden and Norway from January 18, 1814 to October 16, 1818.