Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:4715Bishr b. Khālid > Muḥammad b. Jaʿfar > Shuʿbah > Sulaymān > Ibrāhīm > Abū Maʿmar > ʿAbd

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).  

البخاري:٤٧١٥حَدَّثَنَا بِشْرُ بْنُ خَالِدٍ أَخْبَرَنَا مُحَمَّدُ بْنُ جَعْفَرٍ عَنْ شُعْبَةَ عَنْ سُلَيْمَانَ عَنْ إِبْرَاهِيمَ عَنْ أَبِي مَعْمَرٍ

عَنْ عَبْدِ اللَّهِ ؓ فِي هَذِهِ الآيَةِ {الَّذِينَ يَدْعُونَ يَبْتَغُونَ إِلَى رَبِّهِمِ الْوَسِيلَةَ} قَالَ نَاسٌ مِنَ الْجِنِّ {كَانُوا} يُعْبَدُونَ فَأَسْلَمُوا