What do you mean, "spam"? I got this (and I was happy to) because I'm subscribed to their official channels. If you don't want to receive it, maybe you should unsubscribe to their channels. Or do you mean something else?
I mean that when I signed up for Telegram I never checked any boxes agreeing to recieve marketeing materials. Since signing up for Telegram I have not joined any channels or done anything that could be interpreted as consent to recieving marketing materials. And regardless the sent me spam about this (via the same channel that they sent me a code I needed to login to a second device).
I'm very surprised by this. To me the bot that sends me the login tokens does only that. I received this because I subscribed to an official channel named Telegram News where they share this.
If they're sending news thru the login bot to people who aren't subscribed to news, that's not nice behaviour of them in my view.