Requisitos previos
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Antes de que comiences a escribir el código de tu primera aplicación cliente, hay unas cuantas tareas que debes realizar si aún no las has hecho.
Crea una Cuenta de Google
Necesitas una Cuenta de Google para crear un proyecto en la Consola de APIs de Google. Si ya tienes una cuenta, no tienes que hacer nada más.
También te recomendamos usar otra Cuenta de Google para realizar pruebas.
Prueba Google AdMob
Esta documentación de la API supone que ya usaste Google AdMob y que estás familiarizado con los conceptos de programación web y los formatos de datos web.
Si aún no has usado Google AdMob, prueba la interfaz de usuario antes de comenzar a programar.
Crea un proyecto para tu cliente
Para poder enviar solicitudes a Google AdMob, debes informar a Google sobre tu cliente y activar el acceso a la API. Para ello, debes usar la Consola de APIs de Google para crear un proyecto, que es una colección determinada de parámetros de configuración e información de acceso a la API, y registrar tu aplicación.
Para comenzar a utilizar la API de AdMob, primero debes
uso
la herramienta de configuración, que te guiará para crear un proyecto en el
Consola de APIs de Google, cómo habilitar la API y crear credenciales.
Obtén información sobre los aspectos básicos de REST
REST es un estilo de arquitectura de software que proporciona un enfoque conveniente y coherente para solicitar y modificar datos.
El término REST es la abreviatura de "Representational State Transfer" (transferencia de estado representacional). En el contexto de las API de Google, se refiere al uso de los verbos HTTP para recuperar y modificar las representaciones de los datos almacenados por Google.
En un sistema RESTful, los recursos se almacenan en un almacén de datos; un cliente envía una solicitud para que el servidor ejecute una acción en particular (como crear, recuperar, actualizar o borrar un recurso) y el servidor ejecuta la acción y envía una respuesta que, por lo general, es una representación del recurso especificado.
En las API con tecnología REST de Google, el cliente especifica una acción con un verbo HTTP como POST
, GET
, PUT
o DELETE
. Especifica un recurso mediante un URI único a nivel global de la siguiente manera:
https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters
Dado que todos los recursos de API tienen URI únicos accesibles a través de HTTP, REST permite el almacenamiento de datos en caché y está optimizado para funcionar con la infraestructura distribuida de la Web.
Puedes encontrar las definiciones de métodos en la documentación de estándares del HTTP 1.1, los que incluyen especificaciones para GET
, POST
, PUT
y DELETE
.
REST en la API de AdMob
Las operaciones de la API de AdMob se asignan directamente a los verbos HTTP de REST.
Los formatos específicos para los URI de la API de AdMob son los siguientes:
https://admob.googleapis.com/v1/resourcePath?parameters
El conjunto completo de URI que se usa para cada operación compatible en la API se resume en el documento Referencia de la API de AdMob.
Obtén información sobre los aspectos básicos de JSON
La API de AdMob muestra datos en formato JSON.
JSON (JavaScript Object Notation) es un formato de datos común y, también, independiente del lenguaje que proporciona una representación de texto simple de estructuras de datos arbitrarias. Para obtener más información, visita json.org.
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-31 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-31 (UTC)"],[[["\u003cp\u003eBefore coding, you need a Google Account (potentially a separate one for testing) and familiarity with Google AdMob.\u003c/p\u003e\n"],["\u003cp\u003eYou must create a project in the Google API Console using the provided setup tool to enable API access for your client application.\u003c/p\u003e\n"],["\u003cp\u003eThe AdMob API utilizes RESTful architecture, meaning you should understand basic REST principles and HTTP verbs for interacting with resources.\u003c/p\u003e\n"],["\u003cp\u003eData is exchanged in JSON format, so familiarity with JSON structure and parsing is beneficial.\u003c/p\u003e\n"]]],[],null,["# Prerequisites\n\nBefore you can start coding your first client application, there are a few\nthings you need to do, if you haven't done them already.\n\nGet a Google Account\n--------------------\n\nYou need a [Google Account](https://www.google.com/accounts/NewAccount) in order to [create a project](#project) in the Google API Console. If you already have an account, then you're all set.\n\nYou might also want a separate Google Account for testing purposes.\n\nTry out Google AdMob\n--------------------\n\nThis API documentation assumes that you've used Google AdMob, and that you're familiar with web programming concepts and web data formats.\n\nIf you haven't used Google AdMob, then try out the [user interface](https://admob.google.com) before starting to code.\n\nCreate a project for your client\n--------------------------------\n\nBefore you can send requests to Google AdMob, you need to tell Google about your client and activate access to the API. You do this by using the Google API Console to create a project, which is a named collection of settings and API access information, and register your application.\n\nTo get started using AdMob API, you need to first\n[use\nthe setup tool](https://console.cloud.google.com/start/api?id=admob.googleapis.com&credential=client_key), which guides you through creating a project in the\nGoogle API Console, enabling the API, and creating credentials.\n\nLearn REST basics\n-----------------\n\nREST is a style of software architecture that provides a convenient and consistent approach to requesting and modifying data.\n\nThe term REST is short for \"[Representational State Transfer](https://en.wikipedia.org/wiki/Representational_state_transfer).\" In the context of Google APIs, it refers to using HTTP verbs to retrieve and modify representations of data stored by Google.\n\nIn a RESTful system, resources are stored in a data store; a client sends a request that the server perform a particular action (such as creating, retrieving, updating, or deleting a resource), and the server performs the action and sends a response, often in the form of a representation of the specified resource.\n\nIn Google's RESTful APIs, the client specifies an action using an HTTP verb such as `POST`, `GET`, `PUT`, or `DELETE`. It specifies a resource by a globally-unique URI of the following form: \n\n```\nhttps://www.googleapis.com/apiName/apiVersion/resourcePath?parameters\n```\n\nBecause all API resources have unique HTTP-accessible URIs, REST enables data caching and is optimized to work with the web's distributed infrastructure.\n\nYou may find the [method definitions](https://tools.ietf.org/html/rfc7231#section-4.3) in the HTTP 1.1 standards documentation useful; they include specifications for `GET`, `POST`, `PUT`, and `DELETE`.\n\n### REST in the AdMob API\n\nThe AdMob API operations map directly to REST HTTP verbs.\n\nThe specific formats for AdMob API URIs are: \n\n```\nhttps://admob.googleapis.com/v1/resourcePath?parameters\n```\n\nThe full set of URIs used for each supported operation in the API is summarized in the [AdMob API Reference](/admob/api/v1/reference/rest) document.\n\nLearn JSON basics\n-----------------\n\nThe AdMob API returns data in JSON format.\n\n\n[JSON](http://en.wikipedia.org/wiki/JSON) (JavaScript Object Notation) is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see [json.org](http://www.json.org/).\n\n\u003cbr /\u003e"]]