Browser-based JavaScript app needs user consent to store files in users' Google Drive. Which authorization should you use?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an OAuth Client ID..
Why this is the answer
To allow a browser-based JavaScript app to access a user's Google Drive with their consent, you must use an OAuth Client ID. OAuth 2.0 is the industry-standard protocol for authorization, enabling third-party applications to obtain limited access to a user's protected resources without exposing their credentials. The Client ID identifies your application to Google's authorization server, initiating the consent flow where the user grants or denies permission. An API key is used for authenticating your application to Google Cloud APIs but does not involve user consent or grant access to user-specific data. A SAML token is typically used for single sign-on (SSO) in enterprise environments, not for granting third-party app access to individual user data. A service account is used for server-to-server interactions where no end-user is involved, or for accessing resources on behalf of an application itself, not for accessing an individual user's Google Drive with their explicit consent.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed