Hi @mvana, ah yes, you are correct, my apologies for the mix up
I was easily confused by HASS and I wrongly assumed you meant HACS.
HASS = Home Assistant (Native Integrations)
HACS = Home Assistant Community Store (3rd party repositories)
In answer to your question, the code for the native integration is found here.
homeassistant/components/enphase_envoy
I’m quite novice on python code, so unfortunately I can’t help you find where the token is stored.
At the moment, I am using my own solution via the rest sensor, originally because the native integration didn’t support d7 at the time, but now mainly so I can have efficient 10 second updates instead of 60 second updates. The downside is that it is slightly more complicated to setup than the native implementation and I have to manually refresh my token once a year.
Now that the native implementation supports token authentication, I recommend my solution less than the native one for general use.
I still also use the native Enphase integration for recording sensors like “today_s_energy_production” and “today_s_energy_consumption” so I can verify my figures against what the Envoy reports and also check in on the functionality of the native implementation.