Skip to content

feat(samples): add create permission sample for drive v3 - #4052

Open
prasad2512 wants to merge 1 commit into
googleapis:mainfrom
prasad2512:feat/drive-permission-sample
Open

prasad2512 wants to merge 1 commit into
googleapis:mainfrom
prasad2512:feat/drive-permission-sample

Conversation

@prasad2512

Copy link
Copy Markdown

Description

Adds a new sample create-permission.js under samples/drive/ demonstrating how to create permissions on a Google Drive file using Drive v3 and google.auth.GoogleAuth. Also updates samples/drive/README.md with instructions and adds test coverage in samples/test/test.samples.drive.js.

Impact

Provides a standard, modern example for managing Drive permissions using GoogleAuth, resolving a common request for Drive v3 examples.

Testing

  • Sample tests passed: npx mocha test/test.samples.drive.js (6 passing)
  • Lint check passed: npm run lint (0 errors)

Additional Information

Follows the updated pattern in the repository using google.auth.GoogleAuth without deprecated local-auth.

Checklist

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease
  • Appropriate docs were updated
  • Appropriate comments were added, particularly in complex areas or places that require background
  • No new warnings or issues will be generated from this change

Fixes #3407 🦕

@prasad2512
prasad2512 requested a review from a team as a code owner October 18, 2026 11:24
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. samples Issues that are directly related to samples. labels Oct 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a permission sample to the Drive V3 samples

1 participant