{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":4840,"path":"conversational-interfaces/virtual-agent/configure-multiple-provider-applications.md","title":"Configure multiple provider applications","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure multiple provider applications\n\nYou can configure multiple provider applications to support AI agents where there are multiple primary bots using Virtual Agent API and you need to distinguish between them.\n\n## Before you begin\n\nRole required: admin\n\nBe sure you are in Virtual Agent API application scope.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **sys\\_cs\\_provider\\_application**.\n\n2.  Click **New** to create a new provider application.\n\n3.  On the form, fill in the fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |Name|Name of the provider application, such as `VA API Custom Bot`.|\n    |Provider|Select the provider as **VA Bot to Bot Provider**.|\n    |Inbound Id|Unique inbound Id used in the request message, for example, custom\\_1.|\n    |Message Auth|Configure Message Authentication with a token for inbound communication. See [Configure Message Authentication for inbound communication](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/set-up-message-auth-va-api.md) for more details.|\n\n4.  Click **Submit**.\n\n5.  Navigate to **All** &gt; **System Web Services** &gt; **REST Message**.\n\n6.  Click **New** to create a new REST Message record.\n\n7.  In the REST Message record, fill in the form fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |Name|Name of the REST Message record. This should be the same as the newly created provider application.|\n    |Endpoint|The response endpoint of the primary bot.|\n\n8.  Click **Submit**.\n\n9.  In the HTTP Methods section, click New to create a new method or you can override the default GET method.\n\n    |Field|Description|\n    |-----|-----------|\n    |Name|Name of the HTTP Method. Enter `postMessage`.|\n    |HTTP method|Select **POST**.|\n    |Endpoint|Enter the response endpoint of the primary bot.|\n    |Authentication Type|Configure Basic or OAuth 2.0 authentication as per your requirement. For details about configuring basic authentication, see [Configure a REST message with basic auth](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/t_ConfigureRESTMsgBasicAuth.md). For information about configuring OAuth 2.0, see [Configure a REST message with OAuth](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/t_ConfigureARESTMessageWithOAuth.md).|\n\n10. To use the newly created provider application, pass the Inbound Id of the provider application in the **appInboundId** parameter of the Virtual Agent API request.\n\n    You need to pass the Inbound Id of the provider application in the **appInboundId** parameter for every Virtual Agent API request. The following is a sample Virtual Agent API request that uses the newly created provider application.\n\n    ```\n    \n    {\n        \"userId\": \"adminuser1\",\n        \"emailId\": \"admin@example.com\",\n        \"action\": \"START_CONVERSATION\",\n        \"message\": {\n            \"text\": \"\",\n            \"typed\": true\n        },\n        \"appInboundId\": \"custom_1\",\n        \"contextVariables\": {\n            \"app_name\": \"test\"\n        }\n    }\n    \n    ```\n\n    You can test the configuration by viewing the outbound HTTP logs to verify that your response endpoint was called.\n\n\n**Parent Topic:**[Using Virtual Agent API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/use-virtual-agent-api.md)\n\n"}}