Certains produits et fonctionnalités sont en cours de changement de nom. Les fonctionnalités de playbook et de flux génératifs sont également en cours de migration vers une console unique. Consultez les détails.
Lorsque vous appelez l'API, vous devez spécifier le projet de l'agent dans votre requête.
Ce projet est appelé projet de ressources.
Par exemple, dans la requête curl REST suivante, le projet associé à AGENT_ID est le projet de ressources, et le projet associé au compte de service utilisé pour générer TOKEN est le projet client:
curl -X GET
-H "Authorization: Bearer TOKEN"
"https://REGION_ID-dialogflow.googleapis.com/v3/projects/PROJECT_ID/locations/REGION_ID/agents/AGENT_ID"
Un projet peut jouer le rôle à la fois de projet de consommateur et de projet de ressource.
Les données, les frais et les quotas des agents ne sont associés qu'à ce projet.
Lorsque les projets de consommateur et de ressource sont deux projets différents, les frais, les contraintes de quota, les informations sur l'agent et l'obligation d'activer l'API s'appliquent à l'un ou aux deux projets, comme décrit dans le tableau suivant.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/18 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/08/18 (UTC)."],[[["\u003cp\u003eMultiple Google Cloud projects can be used with Dialogflow, potentially separating authentication, quotas, and billing from agent data.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003cem\u003econsumer project\u003c/em\u003e is the project owning the service account used for API calls, whereas the \u003cem\u003eresource project\u003c/em\u003e is the project containing the agent's data.\u003c/p\u003e\n"],["\u003cp\u003eA single project can serve as both the consumer and resource project, in which case all data, charges, and quotas are associated with that one project.\u003c/p\u003e\n"],["\u003cp\u003eThe consumer project is charged and subject to quotas, while the resource project stores the agent data.\u003c/p\u003e\n"],["\u003cp\u003eThe Dialogflow API must be enabled for both the consumer project and resource project when they are different.\u003c/p\u003e\n"]]],[],null,["# Using multiple projects\n\nIn some cases, you might need to create multiple Google Cloud projects to use\nDialogflow:\n\n- You might find it useful to create one project for authentication, quotas, and billing, and additional projects for [agent](/dialogflow/es/docs/agents-overview) data.\n\nConsumer and resource projects\n------------------------------\n\nWhen you make calls to the API, you typically provide\n\n[service account keys for authentication](/dialogflow/cx/docs/quick/setup#auth).\n\nEach service account is owned by a specific project,\nbut service accounts might be\n\n[provided roles to access resources for other projects](/dialogflow/cx/docs/concept/access-control#gcp-console)\n\nThe project associated with the service account you provide for an API call\nis referred to as the *consumer project*.\n\nWhen you make calls to the API, your request specifies the agent's project.\nThis project is referred to as the *resource project*.\n\nFor example,\nin the following REST curl request,\nthe project associated with `AGENT_ID` is the resource project,\nand the project associated with the service account used to generate `TOKEN`\nis the consumer project: \n\n```\ncurl -X GET\n -H \"Authorization: Bearer TOKEN\"\n \"https://REGION_ID-dialogflow.googleapis.com/v3/projects/PROJECT_ID/locations/REGION_ID/agents/AGENT_ID\"\n```\n\nOne project can play the role of both consumer and resource project.\nAgent data, charges, and quotas are associated only with this project.\n\nWhen consumer and resource projects are two different projects, charges, quota\nconstraints, agent information, and a requirement to enable the API are\napplicable to either or both projects, as described in the following table."]]