[null,null,["最后更新时间 (UTC):2025-08-27。"],[],[],null,["\u003cbr /\u003e\n\nStarting from version 4.0.0, the Firebase Admin SDK for Go has opted into\n[Go modules](https://github.com/golang/go/wiki/Modules). Also, there are breaking\nchanges in [error handling](/docs/reference/admin/error-handling) and semantics.\n\nInstallation changes\n\nConforming to [modules best practices](https://github.com/golang/go/wiki/Modules#semantic-import-versioning),\nthe SDK's major version has been appended to the package name. This\nchange results in the following package name updates:\n\n- firebase.google.com/go → firebase.google.com/go/v4\n- firebase.google.com/go/auth → firebase.google.com/go/v4/auth\n- firebase.google.com/go/db → firebase.google.com/go/v4/db\n- firebase.google.com/go/iid → firebase.google.com/go/v4/iid\n- firebase.google.com/go/messaging → firebase.google.com/go/v4/messaging\n\n| **Note:** Developers who are already using Go modules **must** use the new versioned package name when installing and importing the SDK.\n\nDevelopers already using modules\n\nUse the versioned package name to install the latest version of the SDK. \n\n # Install the latest version:\n go install firebase.google.com/go/v4@latest\n\n # Or install a specific version:\n go install firebase.google.com/go/v4@4.18.0\n\nThe same versioned package name must be used in the source code when importing\nthe SDK. \n\n package helloworld\n\n import (\n \"firebase.google.com/go/v4\"\n \"firebase.google.com/go/v4/auth\"\n \"firebase.google.com/go/v4/messaging\"\n )\n\nTo install an earlier version, use the old (unversioned) package name with an\nexplicit version qualifier. \n\n # Notice the @v3 suffix.\n # This instructs Go tools to fetch the latest v3.x release of the SDK.\n go get firebase.google.com/go@v3\n\nDevelopers not currently using modules\n\nDevelopers who haven't opted into modules yet can continue to install the SDK\nusing the unversioned package name. \n\n go get firebase.google.com/go\n\nNote, however, that this fetches the latest version of the SDK (v4 or later)\nwhich contains other breaking API changes.\n\nGeneral error handling changes\n\nThe v4 SDK introduces a new `errorutils` package that provides functions for\nhandling platform-level error conditions. In the event an error was caused by a\nbackend service error, you can access the original error response by calling\nthe new function `errorutils.HTTPResponse()`. You can use the functions in\nthis package with errors returned by any API in the SDK.\n\nAuthentication API changes\n\n- Added new error handling functions to be used in conjunction with `VerifyIDToken()` and `VerifySessionCookie()` APIs:\n - `IsIDTokenInvalid()`\n - `IsIDTokenExpired()`\n - `IsSessionCookieInvalid()`\n - `IsSessionCookieExpired()`\n - `IsCertificateFetchFailed()`\n- Deprecated:\n - `IsProjectNotFound()`\n - `IsUnknown()`\n - `IsInsufficientPermission()`\n - `IsInvalidEmail()`\n\nFCM API changes\n\n- Renamed the type `messaging.WebpushFCMOptions` to `messaging.WebpushFcmOptions`.\n- Added:\n - `IsThirdPartyAuthError()`\n - `IsQuotaExceeded()`\n - `IsSenderIDMismatch()`\n - `IsUnregistered()`\n - `IsUnavailable()`\n- Deprecated:\n - `IsInvalidAPNSCredentials()`\n - `IsMessageRateExceeded()`\n - `IsMismatchedCredential()`\n - `IsRegistrationTokenNotRegistered()`\n - `IsServerUnavailable()`\n - `IsTooManyTopics()`\n - `IsUnknown()`\n\nIID API changes\n\nAll error handling functions currently available in the `iid` package are now\ndeprecated. Use the corresponding error handling functions provided in the\n`errorutils` package instead."]]