Wenn Sie sich mit anderen Nutzern über unsere Produkte austauschen und Feedback geben möchten, können Sie dem offiziellen Google Ads-Discord-Kanal auf dem Server der Google Advertising and Measurement Community beitreten.
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Es gibt zwei Arten von Transport, die beim Senden von Anfragen an die API verwendet werden können. In unserer Clientbibliothek wird die optimale Option aus den folgenden ausgewählt:
Alternative, die verwendet wird, wenn gRPC nicht verfügbar ist: REST. Es ist keine Installation einer PHP-Erweiterung erforderlich und es basiert auf HTTP/1.1.
Wenn Sie den Transporttyp lieber selbst angeben möchten, anstatt sich auf die oben beschriebenen Standardregeln zu verlassen, können Sie die Eigenschaft transport im Abschnitt CONNECTION Ihrer Datei google_ads_php.ini festlegen:
[CONNECTION]; Optional transport settings.; By default, "grpc" is used if available otherwise "rest".transport = "grpc"
Alternativ können Sie die Transporteinstellung programmatisch konfigurieren, wie alle anderen Einstellungen auch:
$googleAdsClient = (new GoogleAdsClientBuilder()) ... ->withTransport('grpc') ->build();
[null,null,["Zuletzt aktualisiert: 2025-08-27 (UTC)."],[[["\u003cp\u003eThe Google Ads API client library supports two transport types: gRPC (preferred) and REST (fallback).\u003c/p\u003e\n"],["\u003cp\u003egRPC offers better performance but requires the gRPC PHP extension, while REST is based on HTTP/1.1 and doesn't require any specific extension.\u003c/p\u003e\n"],["\u003cp\u003eYou can manually specify your preferred transport type through the \u003ccode\u003egoogle_ads_php.ini\u003c/code\u003e configuration file or programmatically within your code.\u003c/p\u003e\n"],["\u003cp\u003eThe gRPC version utilized by the library is usually managed through dependencies, primarily \u003ccode\u003egoogle/gax\u003c/code\u003e, and occasionally directly within the library's own \u003ccode\u003ecomposer.json\u003c/code\u003e for optimization or compatibility.\u003c/p\u003e\n"]]],[],null,["# Transport\n\nThere are two types of transport that can be used when sending requests to the\nAPI. Our client library selects the optimal one from the following:\n\n- **Preferred** : [gRPC](https://grpc.io/about/). It requires the [installation\n of the gRPC PHP extension](//grpc.io/docs/quickstart/php/) and it is based on HTTP/2.\n- Alternative used when gRPC is not available: [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). It does not require the installation of any PHP extension and it is based on HTTP/1.1.\n\nIf you prefer to specify the transport type yourself instead of relying on\nthe default rules described above, you can set the `transport` property in the\n`CONNECTION` section of your\n[`google_ads_php.ini`](https://github.com/googleads/google-ads-php/blob/HEAD/examples/Authentication/google_ads_php.ini)\nfile: \n\n [CONNECTION]\n ; Optional transport settings.\n ; By default, \"grpc\" is used if available otherwise \"rest\".\n transport = \"grpc\"\n\nAlternatively, you can configure the transport setting programmatically like\nevery other ones: \n\n $googleAdsClient = (new GoogleAdsClientBuilder())\n ...\n -\u003ewithTransport('grpc')\n -\u003ebuild();\n\n| **Key Point:** Typically, the grpc version that this PHP library relies on is transitively specified in [`composer.json`](https://github.com/googleapis/gax-php/blob/master/composer.json) of `google/gax`, which is one of the core dependencies. In some cases, we may specify the protobuf version directly in [`composer.json`](https://github.com/googleads/google-ads-php/blob/HEAD/composer.json) of the PHP library, for better performance or for compatibility."]]