Google says it allows apps from third parties to scan and share data from accounts, according to a letter sent to federal lawmakers.

The letter, obtained by multiple outlets including The Wall Street Journal, from a top Google official said the company allows developers to not only scan data from Gmail, but share it so long as they adhere to Google's rules.

"Developers may share data with third parties so long as they are transparent with the users about how they are using the data," Susan Molinari, Google's vice president of public policy and government affairs for the Americas, wrote in the letter.

Google could not be immediately reached for comment.

Some developers offer extensions users can add to their Gmail accounts to augment their experience, such as task managers. More than a billion people use Gmail.

On Wednesday, the Senate Committee on Commerce, Science and Transportation will hold a hearing aimed at reviewing privacy policies at tech companies including Google. Keith Enright, Google's chief privacy officer, is among those expected to testify.

More:Why Facebook had its worst day ever (and yes, Cambridge Analytica is partly to blame)

Earlier this year, Facebook CEO Mark Zuckerberg testified before Congress on how Facebook handles data after admitting user information was misused by political consultancy Cambridge Analytica.

Follow Brett Molina on Twitter: @brettmolina23.