Google Cloud 控制台(访问文档、打开控制台)是一个网页界面,用于预配、配置、管理和监控使用 Google Cloud 产品的系统。
您可以使用 Google Cloud 控制台设置和管理 Dialogflow 资源。
创建项目
如需使用 Google Cloud提供的服务,您必须创建一个项目。
项目可以组织您的所有 Google Cloud 资源。
项目由一组协作者、已启用的 API(和其他资源)、监控工具、结算信息以及身份验证和访问权限控制组成。您可以创建一个项目,也可以创建多个项目,然后将其用于按资源层次结构组织 Google Cloud 资源。创建项目时,请记下项目 ID。您需要此 ID 才能进行 API 调用。
如需详细了解项目,请参阅 Resource Manager 文档。
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eThis guide covers the necessary steps to set up and begin using Conversational Agents (Dialogflow CX), including creating a project, enabling billing and the Dialogflow API, and configuring authentication.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize the Dialogflow API, you will need to install and initialize the Google Cloud CLI, along with setting up authentication via user accounts or service accounts.\u003c/p\u003e\n"],["\u003cp\u003eAccess control to the Dialogflow API is managed through roles, ensuring that principals have the necessary permissions to perform API calls.\u003c/p\u003e\n"],["\u003cp\u003eThe guide also provides instructions on how to delete resources, revoke credentials, or shut down your project after testing or using Dialogflow CX.\u003c/p\u003e\n"],["\u003cp\u003eIf you will be using data store handlers you will need to activate the Vertex AI Agent Builder service.\u003c/p\u003e\n"]]],[],null,["# Setup and cleanup\n\nThis guide provides all required setup steps to start using Conversational Agents (Dialogflow CX).\nIt also provides advice for possible cleanup steps\nafter trying or testing Conversational Agents (Dialogflow CX).\n\nAbout the Google Cloud Console\n------------------------------\n\n\nThe Google Cloud Console\n([visit documentation](https://support.google.com/cloud/answer/3465889?hl=en&ref_topic=3340599),\n[open console](https://console.cloud.google.com/))\nis a web UI used to provision, configure, manage,\nand monitor systems that use Google Cloud products.\nYou use the Google Cloud Console to set up and manage Dialogflow resources.\n\n\u003cbr /\u003e\n\nCreate a project\n----------------\n\n\nTo use services provided by Google Cloud,\nyou must create a *project* .\nA project organizes all your Google Cloud resources.\nA project consists of a set of collaborators,\nenabled APIs (and other resources), monitoring tools, billing information,\nand authentication and access controls.\nYou can create one project,\nor you can create multiple projects\nand use them to organize your Google Cloud resources in a\n[resource hierarchy](/resource-manager/docs/cloud-platform-resource-hierarchy).\nWhen creating a project, take note of the\n[project ID](/resource-manager/docs/creating-managing-projects#identifying_projects).\nYou will need this ID to make API calls.\nFor more information on projects, see the\n[Resource Manager documentation](/resource-manager/docs/creating-managing-projects).\n\n\u003cbr /\u003e\n\n| **Note:** The steps below use the Google Cloud Console to create a project. The [Conversational Agents console](/dialogflow/cx/docs/concept/console-conversational-agents) and [Dialogflow CX console](/dialogflow/cx/docs/concept/console) can optionally create a project for you.\n| **Warning:** If a project is deleted, the [agents](/dialogflow/cx/docs/concept/agent) linked to the project cannot be recovered.\n\n\nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\u003cbr /\u003e\n\nEnable billing\n--------------\n\n\nA billing account is used to define who pays for a given set of resources,\nand it can be linked to one or more projects.\nProject usage is charged to the linked billing account.\nIn most cases, you configure billing when you create a project.\nFor more information, see the\n[Billing documentation](/billing/docs).\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n\u003cbr /\u003e\n\nEnable the API\n--------------\n\n\nYou must enable the Dialogflow API for your project.\nFor more information on enabling APIs, see the\n[Service Usage documentation](/service-usage/docs/enable-disable).\n\n\nEnable the Dialogflow API.\n\n\n[Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dialogflow.googleapis.com)\n\n\u003cbr /\u003e\n\nIf you will be using\n[data store handlers](/dialogflow/cx/docs/concept/data-store/handler),\nyou must also\n[activate the AI Applications service](/generative-ai-app-builder/docs/before-you-begin#turn-on-discovery-engine).\n\nInstall and initialize the Google Cloud CLI\n-------------------------------------------\n\n| **Note:** You can skip this step if you will not be using the API.\n\n\nIf you plan to use the Dialogflow API,\nyou need to install and initialize the [Google Cloud CLI](/sdk/gcloud).\nThe gcloud CLI is a set of tools that you can use\nto manage resources and applications hosted on Google Cloud.\n\n\nThe following link provides instructions:\n\n\n[Install](/sdk/docs/install) the Google Cloud CLI.\n\nAfter installation,\n[initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n```bash\ngcloud init\n```\n\n\nIf you're using an external identity provider (IdP), you must first\n[sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\u003cbr /\u003e\n\nSet up authentication and access control\n----------------------------------------\n\n| **Note:** You can skip this step if you will not be using the API.\n\n\nIf you plan to use the Dialogflow API,\nyou need to set up authentication.\nAny client application that uses the API\nmust be authenticated and granted access to the requested resources.\nThis section describes important authentication concepts\nand provides steps for setting it up.\nFor more information, see the\n[Google Cloud authentication overview](/docs/authentication).\n\n\u003cbr /\u003e\n\n### Authentication with user accounts\n\n\n*User accounts* are the best authentication option\nwhen learning the Dialogflow API and for local development.\nYou can utilize your user account to authenticate for either\nREST command line executions or client library calls.\n\n#### REST command line user account authentication\n\n| **Note:** If you're using [Cloud Shell](/shell/docs), you are automatically logged in to gcloud, so you do not need to execute `gcloud auth login`.\n\n\nTo authenticate for REST command line calls,\nyou use the gcloud CLI.\nThe\n[`gcloud auth login`](/sdk/gcloud/reference/auth/login)\ncommand logs you in to gcloud with your user account,\nwhich should be done before calling the API.\nThe\n[`gcloud auth print-access-token`](/sdk/gcloud/reference/auth/print-access-token)\ncommand is used throughout the REST command line samples in this documentation\nto authenticate REST calls.\n\n\nTo create user credentials for your local environment: \n\n```text\ngcloud auth login\n```\n\n#### Client library user account authentication\n\n\nTo authenticate for client library calls,\nyou use the gcloud CLI.\nThe\n[`gcloud auth application-default login`](/sdk/gcloud/reference/auth/application-default/login)\ncommand logs you in to gcloud for application default credentials with your user account,\nwhich should be done before calling the API.\n\nThe\n[`gcloud auth application-default set-quota-project`](/sdk/gcloud/reference/auth/application-default/set-quota-project)\ncommand must be used to set your project for billing and quotas\nrelated to API calls.\nNormally, this is the same project used by your agent,\nand you supply the project ID for the project you created in steps above.\n\n\nThe\n`GOOGLE_APPLICATION_CREDENTIALS`\nenvironment variable must not be set in order for your\napplication default credentials to be used by client libraries.\n\n\nTo create application default credentials for your local environment: \n\n```scdoc\ngcloud auth application-default login\ngcloud auth application-default set-quota-project PROJECT_ID\n```\n\n\u003cbr /\u003e\n\n### Authentication with service accounts\n\n\n*Service accounts* provide credentials for applications,\nas opposed to end-users.\nService accounts are owned by projects,\nand you can create many service accounts for a project.\nFor more information, see:\n\n- [The service account overview](/iam/docs/service-accounts)\n- [Service account best practices](/iam/docs/understanding-service-accounts)\n- [Create and manage service accounts](/iam/docs/creating-managing-service-accounts)\n\n\u003cbr /\u003e\n\n### Access control with roles\n\n\nWhen a principal (user account, service account, and so on)\ncalls an API,\nGoogle Cloud requires that the principal has the appropriate permissions.\nYou can grant permissions by granting *roles* to a principal.\nFor more information, see the\n[role overview](/iam/docs/understanding-roles).\n\n\nIf you have created your project with your user account,\nyour user account has the\n[Owner basic role](/iam/docs/understanding-roles#basic)\nfor the project.\nThis role provides access to call any API for the project.\nHowever, if a different account created the project,\nyou may need to have roles granted to your user account\nbefore you can call the API.\n\nFor instructions, see the\n[Dialogflow access control guide](/dialogflow/cx/docs/concept/access-control).\n\n\u003cbr /\u003e\n\nInstall the Conversational Agents (Dialogflow CX) client library\n----------------------------------------------------------------\n\n| **Note:** You can skip this step if you will not be using the API.\n\nYou have three options for calling the API:\n[Google supported client libraries, REST, and gRPC](/dialogflow/cx/docs/reference/api-overview).\n\nClient libraries are available for several popular languages.\nFor installation instructions, see your desired language at\n[Client libraries](/dialogflow/cx/docs/reference/library/overview).\n\nCleanup\n-------\n\n\nAfter setup and trying or testing Dialogflow,\nyou may want to delete resources you created:\n\n- You may want to [delete your agent](/dialogflow/cx/docs/concept/agent#del).\n- You may want to [shutdown your project](/resource-manager/docs/creating-managing-projects#shutting_down_projects).\n- If you called `gcloud auth login`, this stores credentials in your user directory on your computer. You may want to delete these credentials by calling: \n\n ```text\n gcloud auth revoke\n ```\n- If you called `gcloud auth application-default login`, this stores credentials in your user directory on your computer. You may want to delete these credentials by calling: \n\n ```text\n gcloud auth application-default revoke\n ```\n\n\u003cbr /\u003e"]]