Share Folder in Drive with Gsuite API

Hi everyone.

I am doing an automation with Gsuite and Google Sheets API, however i need to share folders and files with emails, that are not part of the API. For example i am example@mail.com and with this email i did the credentials for the API, and i created a folder with a file inside. Now i need to share that folder with that file inside, to client@people.com.

How can i do that?

Thanks for your time!