Voraussetzungen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Bevor Sie mit der Codierung Ihrer ersten Client-Anwendung beginnen, müssen Sie einige Vorbereitungen treffen (falls noch nicht geschehen).
Erstellen Sie sich ein Google-Konto
Sie benötigen ein Google-Konto, um ein Projekt in der Google API Console zu erstellen. Wenn Sie bereits ein solches Konto haben, sind Sie schon startklar.
Wir empfehlen, zu Testzwecken ein separates Google-Konto einzurichten.
Google AdMob testen
In dieser API-Dokumentation wird davon ausgegangen, dass Sie bereits Google AdMob verwendet haben und mit Webprogrammierung und Webdatenformaten vertraut sind.
Wenn Sie Google AdMob noch nicht verwendet haben, machen Sie sich mit der Benutzeroberfläche vertraut, bevor Sie mit dem Programmieren beginnen.
Projekt für den Client erstellen
Bevor Sie Anfragen an Google AdMob senden können, müssen Sie Google über Ihren Kunden informieren und den Zugriff auf die API aktivieren. Dazu verwenden Sie die Google API-Konsole, um ein Projekt zu erstellen, bei dem es sich um eine benannte Sammlung von Einstellungen und API-Zugriffsinformationen handelt, und registrieren Ihre Anwendung.
Um die AdMob API zu verwenden, müssen Sie zuerst
verwenden
das Einrichtungstool, das Sie durch die Erstellung eines Projekts im
Google API Console, um die API zu aktivieren und Anmeldedaten zu erstellen
Informationen zu REST-Grundlagen
REST ist eine Art Softwarearchitektur, die einen bequemen und einheitlichen Ansatz zur Abfrage und Bearbeitung von Daten bietet.
Der Begriff REST steht für Representational State Transfer. Im Zusammenhang mit Google-APIs bezieht es sich auf die Verwendung von HTTP-Verben zum Abrufen und Ändern von Darstellungen von Daten, die von Google gespeichert sind.
In einem als "RESTful" bezeichneten System werden Ressourcen in einem Datenspeicher abgelegt; ein Client sendet eine Aufforderung, der Server möge eine bestimmte Aktion ausführen (z. B. eine Ressource erstellen, abfragen, aktualisieren oder löschen), und der Server führt die Aktion aus und sendet eine Antwort, oft in Form einer Darstellung der angegebenen Ressource.
In Googles RESTful APIs spezifiziert der Client eine Aktion mit einem HTTP-Verb wie POST
, GET
, PUT
oder DELETE
. Eine Ressource wird anhand eines weltweit eindeutigen URIs im folgenden Format spezifiziert:
https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters
Weil alle API-Ressourcen eindeutige, über HTTP zugängliche URIs haben, ermöglicht REST das Caching von Daten und ist optimal geeignet, mit der verteilten Infrastruktur des Webs zu arbeiten.
Dafür können die Methodendefinitionen in der Dokumentation der HTTP 1.1-Standards hilfreich sein. Hier finden Sie auch die Spezifikationen für GET
, POST
, PUT
und DELETE
.
REST in der AdMob API
Die AdMob API-Vorgänge sind REST-HTTP-Verben direkt zugeordnet.
Für AdMob API-URIs gelten folgende spezielle Formate:
https://admob.googleapis.com/v1/resourcePath?parameters
Die vollständige Gruppe von URIs, die für die einzelnen unterstützten Vorgänge in der API verwendet wird, ist in der AdMob API-Referenz zusammengefasst.
Informationen zu JSON-Grundlagen
Die AdMob API gibt Daten im JSON-Format zurück.
JSON (JavaScript Object Notation) ist ein gängiges sprachunabhängiges Datenformat, das eine einfache Textdarstellung beliebiger Datenstrukturen bietet. Weitere Informationen finden Sie unter json.org.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-31 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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"]]