Sahih al-Bukhari
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا بِشْرُ بْنُ خَالِدٍ، أَخْبَرَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، عَنْ شُعْبَةَ، عَنْ سُلَيْمَانَ، عَنْ إِبْرَاهِيمَ، عَنْ أَبِي مَعْمَرٍ، عَنْ عَبْدِ اللَّهِ ـ رضى الله عنه ـ فِي هَذِهِ الآيَةِ {الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمِ الْوَسِيلَةَ} قَالَ نَاسٌ مِنَ الْجِنِّ {كَانُوا} يُعْبَدُونَ فَأَسْلَمُوا.
Narrated `Abdullah:
Regarding the Verse: 'Those whom they call upon (worship) (like Jesus the Son of Mary or angels etc.) desire (for themselves) means of access, to their Lord....' (17:57) (It was revealed regarding) some Jinns who used to be worshipped (by human beings). They later embraced Islam (while those people kept on worshipping them).
Full reference and source
Sahih al-Bukhari USC-MSA web (English) : Vol. 6, Book 60, Hadith 239 Arabic : Book 65, Hadith 4715
View source on Sunnah.com (opens in a new tab)