Authenticate Gootenberg
with Google using OAuth. Create a credentials.json
file by going to the applicable API and clicking the "Enable the API" button and then clicking "Download Client Configuration".
Then, create a token.json
file by running the following from within your node project:
$ npx gootenberg token [ PATH/TO/credentials.json ]
Follow the instructions, and you should have a token.json
file in your current working directory.
import Gootenberg from 'gootenberg';
import credentials from './credentials.json'
import token from './token.json'
async function myFunc(){
const goot = new Gootenberg();
await goot.auth.oauth(credentials, token);
}
myFunc();