An idiomatic C++ client library for theGame Services API, a service to deploy and manage infrastructure for global multiplayer gaming experiences.
While this library isGA, please note Google Cloud C++ client libraries donotfollowSemantic Versioning.
Quickstart
The following shows the code that you'll run in thegoogle/cloud/gameservices/quickstart/directory, which should give you a taste of the Game Services API C++ client library API.
This library offers multiple*Clientclasses, which are listed below. Each one of these classes exposes all the RPCs for a gRPCserviceas member functions of the class. This library groups multiple gRPC services because they are part of the same product or are often used together. A typical example may be the administrative and data plane operations for a single product.
The library also has other classes that provide helpers, configuration parameters, and infrastructure to mock the*Clientclasses when testing your application.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe Game Services API C++ Client Library is a GA (Generally Available) idiomatic C++ client library designed for deploying and managing infrastructure for global multiplayer gaming.\u003c/p\u003e\n"],["\u003cp\u003eThis library includes multiple \u003ccode\u003e*Client\u003c/code\u003e classes, like \u003ccode\u003eGameServerClustersServiceClient\u003c/code\u003e, \u003ccode\u003eGameServerConfigsServiceClient\u003c/code\u003e, \u003ccode\u003eGameServerDeploymentsServiceClient\u003c/code\u003e, and \u003ccode\u003eRealmsServiceClient\u003c/code\u003e, that expose gRPC service functions and group multiple services that are used together.\u003c/p\u003e\n"],["\u003cp\u003eThe library's latest version is \u003ccode\u003e2.13.0-rc\u003c/code\u003e, with previous versions including \u003ccode\u003e2.12.0\u003c/code\u003e and \u003ccode\u003e2.11.0\u003c/code\u003e also being available.\u003c/p\u003e\n"],["\u003cp\u003eThe library automatically retries requests that fail due to transient errors and utilizes exponential backoff to manage retries, with options for developers to customize these default policies.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Cloud C++ client libraries, such as this one, do not adhere to Semantic Versioning, so it's important to check the latest version notes.\u003c/p\u003e\n"]]],[],null,["Version latestkeyboard_arrow_down\n\n- [2.13.0-rc (latest)](/cpp/docs/reference/gameservices/latest)\n- [2.12.0](/cpp/docs/reference/gameservices/2.12.0)\n- [2.11.0](/cpp/docs/reference/gameservices/2.11.0) \n\nGame Services API C++ Client Library\n====================================\n\nAn idiomatic C++ client library for the [Game Services API](https://cloud.google.com/game-servers/docs/), a service to deploy and manage infrastructure for global multiplayer gaming experiences.\n\nWhile this library is **GA** , please note Google Cloud C++ client libraries do **not** follow [Semantic Versioning](https://semver.org/).\n\n### Quickstart\n\nThe following shows the code that you'll run in the `google/cloud/gameservices/quickstart/` directory, which should give you a taste of the Game Services API C++ client library API. \n\n #include \"google/cloud/gameservices/v1/game_server_clusters_client.h\"\n #include \u003ciostream\u003e\n\n int main(int argc, char* argv[]) try {\n if (argc != 4) {\n std::cerr \u003c\u003c \"Usage: \" \u003c\u003c argv[0] \u003c\u003c \" project-id location-id realm-id\\n\";\n return 1;\n }\n\n namespace gameservices = ::google::cloud::gameservices_v1;\n auto client = gameservices::GameServerClustersServiceClient(\n gameservices::MakeGameServerClustersServiceConnection());\n\n auto const realm = \"projects/\" + std::string(argv[1]) + \"/locations/\" +\n std::string(argv[2]) + \"/realms/\" + std::string(argv[3]);\n for (auto r : client.ListGameServerClusters(realm)) {\n if (!r) throw std::move(r).status();\n std::cout \u003c\u003c r-\u003eDebugString() \u003c\u003c \"\\n\";\n }\n\n return 0;\n } catch (google::cloud::Status const& status) {\n std::cerr \u003c\u003c \"google::cloud::Status thrown: \" \u003c\u003c status \u003c\u003c \"\\n\";\n return 1;\n }\n\n### Main classes\n\nThis library offers multiple `*Client` classes, which are listed below. Each one of these classes exposes all the RPCs for a gRPC `service` as member functions of the class. This library groups multiple gRPC services because they are part of the same product or are often used together. A typical example may be the administrative and data plane operations for a single product.\n\nThe library also has other classes that provide helpers, configuration parameters, and infrastructure to mock the `*Client` classes when testing your application.\n\n- [`gameservices_v1::GameServerClustersServiceClient`](/cpp/docs/reference/gameservices/latest/classgoogle_1_1cloud_1_1gameservices__v1_1_1GameServerClustersServiceClient)\n- [`gameservices_v1::GameServerConfigsServiceClient`](/cpp/docs/reference/gameservices/latest/classgoogle_1_1cloud_1_1gameservices__v1_1_1GameServerConfigsServiceClient)\n- [`gameservices_v1::GameServerDeploymentsServiceClient`](/cpp/docs/reference/gameservices/latest/classgoogle_1_1cloud_1_1gameservices__v1_1_1GameServerDeploymentsServiceClient)\n- [`gameservices_v1::RealmsServiceClient`](/cpp/docs/reference/gameservices/latest/classgoogle_1_1cloud_1_1gameservices__v1_1_1RealmsServiceClient)\n\n### More Information\n\n- [Error Handling](https://cloud.google.com/cpp/docs/reference/common/latest/common-error-handling.html) - describes how the library reports errors.\n- [How to Override the Default Endpoint](/cpp/docs/reference/gameservices/latest/gameservices-override-endpoint) - describes how to override the default endpoint.\n- [How to Override the Authentication Credentials](/cpp/docs/reference/gameservices/latest/gameservices-override-authentication) - describes how to change the authentication credentials used by the library.\n- [Override Retry, Backoff, and Idempotency Policies](/cpp/docs/reference/gameservices/latest/gameservices-override-retry) - describes how to change the default retry policies.\n- [Environment Variables](/cpp/docs/reference/gameservices/latest/gameservices-env) - describes environment variables that can configure the behavior of the library."]]