Find out which one of my installed app open spam links I have a galaxy s7 edge. In the past few weeks I'm facing a problem, My device open some Telegram app channels and try to join me on these channels. I'm 
android developer and based on my experience I know this happening because one app send spam links and try to advertise these channels. But the problem is I don't know how to detect this app.
Possibly it's a background service of any app in your phone which is letting these spam ads in.
To find out the app, what you can do is install Shutapp and enable its service and try to stop apps one by one (these apps will be the apps running in background).
To see the list of running apps, click under the big circle. I use this app for the very same purpose and it also really works well in closing these apps.
Remember, closing apps will disable their notifications like closing WhatsApp will let to no notification of any new message at all until reopening of that app.Hope it helps you.