I did some research on Google the other day. I wanted to know when and how the supposedly claim of scientific global warming consensus first appeared in the media and where it came from.
The earliest article I found was this article from March in 1989 in the New York Times.
Apparently the EPA, the US Environment Protection Agency, in a report to the congress then stated that there is a scientific consensus that the increase in greenhouse gases will cause substantial warming. Although they also stated there are still great uncertainties of the magnitude of this warming.
So it appears that it was the EPA, which was the first to invent this consensus.
The problem is that no survey was ever taken to confirm their claims. Of course those environmentally inclined scientists who committed themselves to study human influence on climate probably held that view. While at the same time, those same scientists were busy blocking inputs from scientists in this subject from other relevant disciplines such as space, solar physics and geology.