 In 1840, he was appointed as a confidant of the king Frederick William IV of Prussia.He moved to Berlin and two years later he was appointed as Minister of State.After the March Revolution of 1848, he was forced to resign from this position.