According to Bill Bryson's "Made in America", OK was at one time speculated to have meant "only kissing" or "only kidding", or even - allegedly used by the only semi-literate American President Andrew Jackson - "oll korrect".
Some thought it came from Greek "olla kalla" ("all good"), or from a brand of Haitian Rum called "Aux Cayes", or indeed that it stood for "open key" in early telegraphy.
1941 Allen Walker Read from Columbia University started investigating the matter. It took him 20 years to establish that OK was first used on March 23rd 1839 in the Boston Morning Post as a jocular abbreviation for "Oll Korrect".
However, the word only became widely used after a support group for the election of Martin van Buren, whose nickname was "Old Kinderhook", as American President in 1840, called itself "The Democratic OK Support Group".