Is it possible to use @googleapis/gmail without installing the entire googleapis dependency?

Viewed 63

The @googleapis/gmail dependency can be installed by itself, but there is one line I can't get to work without installing the greater googleapis dependency, from the quickstart, it's the call to get the oauth client:

const gmail = google.gmail({version: 'v1', auth});

Does getting the authorized client require the entire googleapis package be installed or am I missing something?

1 Answers

Based on documentation, yes, you can make calls directly to the API by installing a submodule, in this case @googleapis/gmail. You can see this sample on how to make calls when installing a submodule. You can also try installing the Google Auth Library npm install google-auth-library

Related