

For details, see the Google Developers Site Policies.

If you're signed in to multiple accounts, If you're not already signed in to your Google Account, you're.The first time you run the sample, it prompts you to authorize access:

In your working directory, run the sample: In your working directory, create a file named index.js.Ĭonst `) Īuthorize().then(printDocTitle).catch(console.error) Save the downloaded JSON file as credentials.json, and move the.The newly created credential appears under OAuth 2.0 Client IDs. The OAuth client created screen appears, showing your new Client ID and Client secret. This name is only shown in the Google Cloud console. In the Name field, type a name for the credential.Click Create Credentials > OAuth client ID.

In the Google Cloud console, go to Menu menu > APIs & Services > Credentials. Itĭoesn't work if run on a remote terminal such as Cloud Shell or over SSH. You must create a separate client ID for each platform.Ĭaution: This quickstart must be run locally and with access to a browser. To authenticate as an end user and access user data in your app, you need toĬreate one or more OAuth 2.0 Client IDs. In the Google Cloud console, enable the Google Docs API.Īuthorize credentials for a desktop application You can enable one or more APIs in a single Google Cloud project. Enable the APIīefore using Google APIs, you need to enable them in a Google Cloud project. To complete this quickstart, set up your environment. To run this quickstart, you need the following prerequisites: If you're unfamiliar with authentication and authorization forĪuthentication and authorization overview.Ĭreate a Node.js command-line application that makes requests to the Before you can run the sampleĪpp, each quickstart requires that you turn on authentication andĪuthorization. You use the client libraries for your own apps. Google Workspace quickstarts use the API client libraries to handle someĭetails of the authentication and authorization flow. Quickstarts explain how to set up and run an app that calls a
