Google Cloud Professional Cloud Developer — Question 134
You developed a JavaScript web application that needs to access Google Drive's API and obtain permission from users to store files in their Google Drives. You need to select an authorization approach for your application. What should you do?
Answer options
- A. Create an API key.
- B. Create a SAML token.
- C. Create a service account.
- D. Create an OAuth Client ID.
Correct answer: D
Explanation
The correct answer is D, as using an OAuth Client ID is the standard method for obtaining user consent to access their Google Drive. Options A and B do not provide the necessary user authorization for accessing personal Google Drive files, and option C, while useful for server-to-server interactions, does not involve user consent.