设置 Data Portability API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在开始向 Data Portability API 发送请求之前,您必须在 Google Cloud 控制台中创建一个新项目、启用结算功能并启用 Data Portability API。
创建项目
- 点击 Create project。
- 输入名称或接受生成的建议。
- 确认或修改所有剩余字段。
- 点击创建。
记下您的项目 ID:您需要使用它向用户发送续订链接。
启用结算功能
要为您的项目启用结算功能,请执行以下操作:
- 访问 。
- 如果您没有有效的结算账号,请点击添加结算账号并按照说明创建一个。
启用 API
Data Portability API 已公开提供,您可以在 API 库中搜索“Data Portability API”来发现它。您可以在界面中或使用 gcloud CLI 启用此功能。
如需使用 gcloud CLI 启用此功能,请运行以下命令。
gcloud services enable dataportability.googleapis.com
如需确认数据可携性 API 是否已启用,请查看已启用的 API 和服务。
如果您需要有关设置 gcloud CLI 的帮助,请参阅安装 gcloud CLI。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-29。
[null,null,["最后更新时间 (UTC):2025-07-29。"],[[["\u003cp\u003eTo use the Data Portability API, you must first create a new project in the Google Cloud console, enable billing for the project, and then enable the Data Portability API itself.\u003c/p\u003e\n"],["\u003cp\u003eYou can enable the Data Portability API through the Google Cloud console UI or by using the gcloud CLI command \u003ccode\u003egcloud services enable dataportability.googleapis.com\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eBefore enabling the API, ensure you have an active billing account associated with your project, which can be created or managed through the Billing page in the Google Cloud console.\u003c/p\u003e\n"]]],[],null,["Before you can begin sending requests to the Data Portability API, you must create a\nnew project, enable billing, and enable the Data Portability API in the Google Cloud\nconsole.\n\nCreate your project\n\n1. Go to the [Google API Console](https://console.developers.google.com/project).\n2. Click **Create project**.\n3. Enter a name or accept the generated suggestion.\n4. Confirm or edit any remaining fields.\n5. Click **Create**.\n\nNote your project ID: you need it to send [Renewal links](/data-portability/user-guide/renewal) to your users.\n\nEnable billing\n\nTo enable billing for your project:\n\n1. Visit the [Billing page](https://console.developers.google.com/billing).\n2. If you don't have an active billing account, create one by clicking **Add billing account** and following the instructions.\n\nEnable the API\n\nThe Data Portability API is publicly available and discoverable in the API Library by\nsearching for \"Data Portability API\". Enable it in the UI or by using the gcloud CLI.\nTo enable it by using the gcloud CLI, run this command. \n\n gcloud services enable dataportability.googleapis.com\n\nTo confirm that the Data Portability API is enabled, view your\n[Enabled APIs and Services](https://console.cloud.google.com/apis/dashboard).\n\nIf you need help setting up the gcloud CLI, see [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install)."]]