You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -20,71 +20,138 @@ After you have created your bot and tested it locally, you can deploy it to Azur
20
20
In this article, we'll show you how to deploy C# and JavaScript bots to Azure. It would be useful to read this article before following the steps, so that you fully understand what is involved in deploying a bot.
21
21
22
22
## Prerequisites
23
-
- Install latest version of the [MSBot](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/MSBot) tool.
24
-
- A [CSharp](./dotnet/bot-builder-dotnet-sdk-quickstart.md) or [JavaScript](./javascript/bot-builder-javascript-quickstart.md) bot that you have developed on your local machine.
25
23
26
-
## Create a Web App Bot in Azure
27
-
This section is optional if you have already created a bot in Azure that you'd like to use.
24
+
- Install latest version of the [msbot](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/MSBot) tool.
25
+
- A [CSharp](./dotnet/bot-builder-dotnet-sdk-quickstart.md) or [JavaScript](./javascript/bot-builder-javascript-quickstart.md) bot that you have developed on your local machine.
26
+
27
+
## 1. Prepare for deployment
28
+
The deployment process requires a target Web App Bot in Azure so that your local bot can be deployed into it. The target Web App Bot and the resources that are provisioned with it in Azure are used by your local bot for deployment. This is necessary because your local bot does not have all the required Azure resources provisioned. When you create a target Web App bot, the following resources are provisioned for you:
29
+
- Web App Bot – you will use this bot to deploy your local bot into.
30
+
- App Service Plan - provides the resources that an App Service app needs to run.
31
+
- App Service - service for hosting web applications
32
+
- Storage account - contains all your Azure Storage data objects: blobs, files, queues, tables, and disks.
33
+
34
+
During the creation of the target Web App Bot, an app ID and password are also generated for your bot. In Azure, the app ID and password support [service authentication and authorization](https://docs.microsoft.com/azure/app-service/overview-authentication-authorization). You will retrieve some of this information for use in your local bot code.
35
+
36
+
> [!IMPORTANT]
37
+
> The language for the bot template for the service must match the language your bot is written in.
38
+
39
+
Creating a new Web App Bot is optional if you have already created a bot in Azure that you'd like to use.
28
40
29
41
1. Log in to the [Azure portal](https://portal.azure.com).
30
42
1. Click **Create new resource** link found on the upper left-hand corner of the Azure portal, then select **AI + Machine Learning > Web App bot**.
31
43
1. A new blade will open with information about the Web App Bot.
32
44
1. In the **Bot Service** blade, provide the requested information about your bot.
33
45
1. Click **Create** to create the service and deploy the bot to the cloud. This process may take several minutes.
34
46
35
-
## Download the source code
47
+
### Download the source code
48
+
After creating the target Web App Bot, you need to download the bot code from the Azure portal to your local machine. The reason for downloading code is to get the service references that are in the [.bot file](./v4sdk/bot-file-basics.md). These service reference are for Web App Bot, App Service Plan, App Service, and Storage Account.
49
+
36
50
1. In the **Bot Management** section, click **Build**.
37
51
1. Click on **Download Bot source code** link in the right-pane.
38
52
1. Follow the prompts to download the code, and then unzip the folder.
39
53
40
-
## Decrypt the .bot file
41
-
The source code you downloaded from the Azure portal includes an encrypted .bot file. You'll need to decrypt it to copy values into your local .bot file.
54
+
### Decrypt the .bot file
55
+
56
+
The source code you downloaded from the Azure portal includes an encrypted .bot file. You'll need to decrypt it to copy values into your local .bot file. This step is necessary so that you can copy actual service references and not the encrypted ones.
42
57
43
58
1. In the Azure portal, open the Web App Bot resource for your bot.
44
59
1. Open the bot's **Application Settings**.
45
60
1. In the **Application Settings** window, scroll down to **Application settings**.
46
61
1. Locate the **botFileSecret** and copy its value.
Open the .bot file you decrypted. Copy **all** entries listed under the `services` section, and add them to your local .bot file. Resolve any duplicate service entries or duplicate service IDs. Keep any additional service references your bot depends on. For example:
72
+
73
+
```json
74
+
"services": [
75
+
{
76
+
"type": "abs",
77
+
"tenantId": "<tenant-id>",
78
+
"subscriptionId": "<subscription-id>",
79
+
"resourceGroup": "<resource-group-name>",
80
+
"serviceName": "<bot-service-name>",
81
+
"name": "<friendly-service-name>",
82
+
"id": "1",
83
+
"appId": "<app-id>"
84
+
},
85
+
{
86
+
"type": "blob",
87
+
"connectionString": "<connection-string>",
88
+
"tenantId": "<tenant-id>",
89
+
"subscriptionId": "<subscription-id>",
90
+
"resourceGroup": "<resource-group-name>",
91
+
"serviceName": "<blob-service-name>",
92
+
"id": "2"
93
+
},
94
+
{
95
+
"type": "endpoint",
96
+
"appId": "",
97
+
"appPassword": "",
98
+
"endpoint": "<local-endpoint-url>",
99
+
"name": "development",
100
+
"id": "3"
101
+
},
102
+
{
103
+
"type": "endpoint",
104
+
"appId": "<app-id>",
105
+
"appPassword": "<app-password>",
106
+
"endpoint": "<hosted-endpoint-url>",
107
+
"name": "production",
108
+
"id": "4"
109
+
},
110
+
{
111
+
"type": "appInsights",
112
+
"instrumentationKey": "<instrumentation-key>",
113
+
"applicationId": "<appinsights-app-id>",
114
+
"apiKeys": {},
115
+
"tenantId": "<tenant-id>",
116
+
"subscriptionId": "<subscription-id>",
117
+
"resourceGroup": "<resource-group>",
118
+
"serviceName": "<appinsights-service-name>",
119
+
"id": "5"
120
+
}
121
+
],
65
122
```
66
123
67
124
Save the file.
68
-
69
-
## Setup a repository
70
-
Create a git repository using your favorite git source control provider. Commit your code into the repository.
71
-
72
-
## Update App Settings in Azure
125
+
126
+
### Setup a repository
127
+
128
+
To support continuous deployment, create a git repository using your favorite git source control provider. Commit your code into the repository.
129
+
130
+
Make sure that your repository root has the correct files, as described under [prepare your repository](https://docs.microsoft.com/azure/app-service/deploy-continuous-deployment#prepare-your-repository).
131
+
132
+
### Update App Settings in Azure
133
+
The local bot does not use an encrypted .bot file, but the Azure portal has an that you are deploying doesn't
73
134
1. In the Azure portal, open the **Web App Bot** resource for your bot.
74
135
1. Open the bot's **Application Settings**.
75
136
1. In the **Application Settings** window, scroll down to **Application settings**.
76
137
1. Locate the **botFileSecret** and delete it.
77
138
1. Update the name of the bot file to match the file you checked into the repo.
78
139
1. Save changes.
79
140
141
+
## 2. Deploy using Azure Deployment Center
80
142
81
-
## Deploy using Azure Deployment Center
82
-
Now, you need to connect your git repository with Azure App Services. Follow instructions in the [setup continuous deployment](https://docs.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment) topic. Note that it is recommended to build using `App Service Kudu build server`.
143
+
Now, you need to upload your bot code to Azure. Follow instructions in the [Continuous deployment to Azure App Service](https://docs.microsoft.com/azure/app-service/deploy-continuous-deployment) topic.
83
144
84
-
## Test your deployment
85
-
Wait for a few seconds after a succesful deployment and optionally restart your Web App to clear any cache. Go back to your Web App Bot blade and test using the Web Chat provided in the Azure portal.
145
+
Note that it is recommended to build using `App Service Kudu build server`.
146
+
147
+
Once you've configured continuous deployment, changes you commit to your repo are published. However, if you add services to your bot, you will need to add entries for these to your .bot file.
148
+
149
+
## 3. Test your deployment
150
+
151
+
Wait for a few seconds after a successful deployment and optionally restart your Web App to clear any cache. Go back to your Web App Bot blade and test using the Web Chat provided in the Azure portal.
86
152
87
153
## Additional resources
154
+
88
155
-[How to investigate common issues with continuous deployment](https://github.com/projectkudu/kudu/wiki/Investigating-continuous-deployment)
Copy file name to clipboardExpand all lines: articles/bot-service-channel-connect-email.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ manager: kamrani
8
8
ms.topic: article
9
9
ms.service: bot-service
10
10
ms.subservice: sdk
11
-
ms.date: 10/10/2018
11
+
ms.date: 02/08/2019
12
12
---
13
13
# Connect a bot to Office 365 email
14
14
@@ -66,6 +66,10 @@ For more information about using `channelData`,
66
66
see [how to implement channel-specific functionality](~/v4sdk/bot-builder-channeldata.md).
67
67
::: moniker-end
68
68
69
+
## Other considerations
70
+
71
+
If your bot does not return a 200 OK HTTP status code within 15 seconds in response to an incoming email message, the email channel will try to resend the message, and your bot may receive the same email message activity a few times. For more information, see the [HTTP details](v4sdk/bot-builder-basics.md#http-details) section in **How bots work** and the how to [troubleshooting timeout errors](https://github.com/daveta/analytics/blob/master/troubleshooting_timeout.md) article.
72
+
69
73
## Additional resources
70
74
71
75
<!-- Put whole list in monikers, even though it's just the second item that needs to be different. -->
description: Learn how to configure a bot's connection to LINE.
4
+
keywords: connect a bot, bot channel, LINE bot, credentials, configure, phone
5
+
author: ivorb
6
+
ms.author: v-ivorb
7
+
manager: kamrani
8
+
ms.topic: article
9
+
ms.service: bot-service
10
+
ms.subservice: sdk
11
+
ms.date: 1/7/2019
12
+
---
13
+
14
+
# Connect a bot to LINE
15
+
16
+
You can configure your bot to communicate with people through the LINE app.
17
+
18
+
## Log into the LINE console
19
+
20
+
Log into the [LINE developer console](https://developers.line.biz/console/register/messaging-api/provider/) of your LINE account, using *Log in with Line*.
21
+
22
+
> [!NOTE]
23
+
> If you haven't already, [download LINE](https://line.me/), then go to your settings to register your email address.
24
+
25
+
### Register as a developer
26
+
27
+
If this is your first time on the LINE developer console, enter your name and email address to create a developer account.
Click on the channel you created to access your channel settings, and scroll down to find the **Basic information > Channel secret**. Save that somewhere for a moment.
Then, scroll farther to **Messaging settings**. There, you will see a **Channel access token** field, with an *issue* button. Click that button to get your access token, and save that for the moment as well.
Next, go back to the LINE developer console and paste the webhook URL from Azure into the **Message settings > Webhook URL**, and click **Verify** to verify the connection. If you just created the channel in Azure, it may take a few minutes to take effect.
80
+
81
+
Then, enable **Message settings > Use webhooks**.
82
+
83
+
> [!IMPORTANT]
84
+
> In LINE Developer Console, you must first set the webhook URL, and only then set **Use webhooks = Enabled**. First enabling webhooks with an empty URL will not set the enabled status, even though the UI may say otherwise.
85
+
86
+
After you added a webhook URL and then enabled webhooks, make sure to reload this page and verify that these changes were set correctly.
Once you have completed these steps, your bot will be successfully configured to communicate with users on LINE and is ready to test.
93
+
94
+
### Add your bot to your LINE mobile app
95
+
96
+
In the LINE developer console, navigate to the settings page and you will see a QR code of your bot.
97
+
98
+
In the Mobile LINE app, go to the right most navigation tab with three dots [**...**] and tap on the QR code icon.
99
+
100
+

101
+
102
+
Point the QR code reader at the QR code in your developer console. You should now be able to interact with your bot in your mobile LINE app and test your bot.
103
+
104
+
### Automatic messages
105
+
106
+
When you start testing your bot, you may notice the bot sends unexpected messages that are not the ones you specified in the `conversationUpdate` activity. Your dialog may look something like this:
To avoid sending these messages, you need to switch off the Auto-response messages.
111
+
112
+

113
+
114
+
Alternatively, you can choose to keep these messages. In this case, it may be a good idea to click “Set message” and edit it.
115
+
116
+

117
+
118
+
## Troubleshooting
119
+
120
+
* In case your bot is not responding to any of your messages at all, navigate to your bot in Azure portal, and choose Test in Web Chat.
121
+
* If the bot works there, but does not respond in LINE, reload your LINE Developer Console page and repeat the webhook instructinos above. Be sure you set the **Webhook URL** before enabling webhooks.
122
+
* If the bot doesn't work in Web Chat, debug the issue for your bot then come back and finish configuring your LINE channel.
Copy file name to clipboardExpand all lines: articles/bot-service-manage-overview.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,13 +40,17 @@ In the **Overview** blade, you can find high level information about your bot. F
40
40
41
41

42
42
43
-
The **Application Settings** blade contains detailed information about your bot, such as the bot's environment, ID, Application Insights key, Microsoft App ID, and Microsoft App password.
43
+
The **Application Settings** blade contains detailed information about your bot, such as the bot's environment, debug settings, and application settings keys such as botFilePath and botFileSecret.
44
44
45
45
### MicrosoftAppID and MicrosoftAppPassword
46
46
47
-
You can find the **MicrosoftAppID**for your bot in the **Settings** blade. The **MicrosoftAppPassword** for your bot is only shown when you first create your bot.
47
+
The **MicrosoftAppID**and **MicrosoftAppPassword** are kept within the bot's `.bot` file. To retrieve them, download the bot file and decrypt it, which may be necessary for you to test locally with the ID and password.
48
48
49
-

49
+
### Bot file path and secret
50
+
51
+
You can find the **botFilePath** and the **botFileSecret** for your bot in the **Application settings** blade.
52
+
53
+

50
54
51
55
> [!NOTE]
52
56
> The **Bot Channels Registration** bot service comes with a *MicrosoftAppID* but because there is no app service associated with this type of service, there is no **Application Settings** blade for you to look up the *MicrosoftAppPassword*. To get the password, you must go generate one. To generate the password for a **Bot Channels Registration**, see [Bot Channels Registration password](bot-service-quickstart-registration.md#bot-channels-registration-password)
Copy file name to clipboardExpand all lines: articles/bot-service-review-guidelines.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,6 @@ Your app integration and its associated metadata must:
25
25
26
26
- If your app integration handles users' personal information (personal information includes all information or data that identifies or could be used to identify a person, or that is associated with such information or data. Examples of personal information include: name and address, phone number, biometric identifiers, location, contacts, photos, audio & video recordings, documents, SMS, email, or other text communication, screenshots, and in some cases, combined browsing history), you must provide a prominent link from your app integration to an applicable privacy policy, and such privacy policy must comply with all applicable laws, regulations and policy requirements. This policy should cover what data you are collecting or transmitting, what you will be doing with that data, and (if applicable) who you'll be sharing it with. If you don’t have a privacy statement, here are some third-party resources* that might be of some assistance:
0 commit comments