Based on the Firebase tutorial this line is in the firebaseMessaging service which, itself, is started from the starter service.
So, you dont need to do anything more than to start your app. Everytime you start the app, a token will be aquired. It may be the same token for days/weeks.
But it can happen that it changes! There is a event for this...
So, in your subscribetotopics you can call a server app on your server to give the token to your server. The server itself stores the token in a database or whatever.
Use the values stored in your server to send pushes.