Download Gmail credentials
In Chapter 12, Concurrency, Networking, and Cloud Services, we wrote the OAuth2 handlers and Gmail integration using only the standard library. For this final code exploration, we'll use the helpful library that Google has created for interacting with Gmail servers. To use this library, we need the client credentials in a different format (credentials.json). To access this, log in to your Google account and go to the Go quickstart page at https://developers.google.com/gmail/api/quickstart/go. Once here, you'll need to click on ENABLE THE GMAIL API and then DOWNLOAD CLIENT CONFIGURATION. This will download the credentials.json file that we'll need to initialize the library in the next section, Creating server provider ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access