I always say they were invented in 1879. Year first 4 stroke was patented. But really think we will never know. How many folks independently came up with the concept. Lots of steam bikes. If it didn't make the papers, gonna be no record.
This is a really great article on bikes. Bicycle History
Those folks did some amazing stuff. All hand made.