![]() ![]() Run the sample code, you aren't prompted for authorization. Select one account to use for authorization.Īuthorization information is stored in the file system, so the next time you 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(listFiles).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 Drive 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |