Depending on what you want to do, you cannot use API key authentication when working with Google Sheets. In this case, please use OAuth.
Please check this thread for a sample project that shows how to configure and use the G Suite activities with OAuth authentication: GSuite - Gmail Activity Unauthorized client error - #12 by Mateus_Cruz
Let us know if you still have problems after trying this sample.
2 Likes