Obtén tu ID de cliente de la API de Google
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Acceder con Google administra el flujo de OAuth 2.0 y el ciclo de vida del token, lo que simplifica tu integración con las APIs de Google. Un usuario siempre tiene la opción de revocar el acceso a una aplicación en cualquier momento.
Antes de integrar la biblioteca de autorización de terceros de Google en tu sitio web, debes crear un ID de cliente, que necesitas para llamar a la API de autorización de terceros.
Para crear un proyecto y un ID de cliente de la consola de Google Cloud, sigue las instrucciones para obtener tu ID de cliente de la API de Google.
Cuando configures el proyecto, selecciona el tipo de cliente del navegador web y especifica el URI de origen de tu app. Cuando realices pruebas, se deben agregar http://localhost
y http://localhost:<port_number>
al campo Orígenes autorizados de JavaScript.
Una vez que se complete la configuración, toma nota del ID de cliente que se creó.
Necesitarás este ID para completar los próximos pasos. (También se crea un secreto de cliente, pero solo lo necesitas para las operaciones del servidor).
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-08-06 (UTC)
[null,null,["Última actualización: 2025-08-06 (UTC)"],[[["\u003cp\u003eGoogle Sign-In streamlines the use of Google APIs by managing the OAuth 2.0 flow and token lifecycle, allowing users to revoke access at any time.\u003c/p\u003e\n"],["\u003cp\u003eBefore integrating Google 3P Authorization, you need to create a client ID within a Google API Console project, specifying the Web browser client type and authorized origins including localhost for testing.\u003c/p\u003e\n"],["\u003cp\u003eAfter project configuration, note the generated client ID, which is essential for subsequent integration steps.\u003c/p\u003e\n"]]],[],null,["# Get your Google API client ID\n\nGoogle Sign-In manages the OAuth 2.0 flow and token lifecycle, simplifying your\nintegration with Google APIs. A user always has the option to [revoke access](https://myaccount.google.com/permissions)\nto an application at any time.\n\nBefore you can integrate Google 3P Authorization library into your website, you\nmust create a client ID, which you need to call the 3P Authorization API.\n\nTo create a Google Cloud console Project and Client ID, follow the\n[instructions to get your Google API client ID](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid#get_your_google_api_client_id).\n\nWhen you configure the project, select the Web browser client type and specify\nthe origin URI of your app. When you perform tests, both `http://localhost` and\n`http://localhost:\u003cport_number\u003e` must be added to the Authorized JavaScript\norigins field.\n\nAfter configuration is complete, take note of the client ID that was created.\nYou will need the client ID to complete the next steps. (A client secret is also\ncreated, but you need it only for server-side operations.)"]]