The azure-native:botservice:Channel resource, part of the Pulumi Azure Native provider, connects Azure Bot Service bots to messaging platforms, voice assistants, and communication channels. This guide focuses on three capabilities: platform integrations (Alexa, LINE, email), authentication methods for email channels, and speech recognition with Cognitive Services.
Channels depend on an existing bot resource and require platform-specific credentials from external services like Amazon Developer Console, LINE Developers, or Azure Cognitive Services. The examples are intentionally small. Combine them with your own bot resources and credential management.
Connect your bot to Amazon Alexa
Teams building voice experiences integrate bots with Amazon Alexa to reach users through Echo devices and the Alexa app.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const channel = new azure_native.botservice.Channel("channel", {
channelName: "AlexaChannel",
location: "global",
properties: {
channelName: "AlexaChannel",
properties: {
alexaSkillId: "XAlexaSkillIdX",
isEnabled: true,
},
},
resourceGroupName: "OneResourceGroupName",
resourceName: "samplebotname",
});
import pulumi
import pulumi_azure_native as azure_native
channel = azure_native.botservice.Channel("channel",
channel_name="AlexaChannel",
location="global",
properties={
"channel_name": "AlexaChannel",
"properties": {
"alexa_skill_id": "XAlexaSkillIdX",
"is_enabled": True,
},
},
resource_group_name="OneResourceGroupName",
resource_name_="samplebotname")
package main
import (
botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
ChannelName: pulumi.String("AlexaChannel"),
Location: pulumi.String("global"),
Properties: &botservice.AlexaChannelArgs{
ChannelName: pulumi.String("AlexaChannel"),
Properties: &botservice.AlexaChannelPropertiesArgs{
AlexaSkillId: pulumi.String("XAlexaSkillIdX"),
IsEnabled: pulumi.Bool(true),
},
},
ResourceGroupName: pulumi.String("OneResourceGroupName"),
ResourceName: pulumi.String("samplebotname"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var channel = new AzureNative.BotService.Channel("channel", new()
{
ChannelName = "AlexaChannel",
Location = "global",
Properties = new AzureNative.BotService.Inputs.AlexaChannelArgs
{
ChannelName = "AlexaChannel",
Properties = new AzureNative.BotService.Inputs.AlexaChannelPropertiesArgs
{
AlexaSkillId = "XAlexaSkillIdX",
IsEnabled = true,
},
},
ResourceGroupName = "OneResourceGroupName",
ResourceName = "samplebotname",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.botservice.Channel;
import com.pulumi.azurenative.botservice.ChannelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var channel = new Channel("channel", ChannelArgs.builder()
.channelName("AlexaChannel")
.location("global")
.properties(AlexaChannelArgs.builder()
.channelName("AlexaChannel")
.properties(AlexaChannelPropertiesArgs.builder()
.alexaSkillId("XAlexaSkillIdX")
.isEnabled(true)
.build())
.build())
.resourceGroupName("OneResourceGroupName")
.resourceName("samplebotname")
.build());
}
}
resources:
channel:
type: azure-native:botservice:Channel
properties:
channelName: AlexaChannel
location: global
properties:
channelName: AlexaChannel
properties:
alexaSkillId: XAlexaSkillIdX
isEnabled: true
resourceGroupName: OneResourceGroupName
resourceName: samplebotname
The channelName property identifies the channel type as “AlexaChannel”. The alexaSkillId connects your bot to a specific Alexa skill registered in the Amazon Developer Console. Set isEnabled to true to activate the channel. The resourceName references the bot resource this channel belongs to.
Enable email conversations with password authentication
Email channels allow users to interact with bots through standard email clients using password-based authentication.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const channel = new azure_native.botservice.Channel("channel", {
channelName: "EmailChannel",
location: "global",
properties: {
channelName: "EmailChannel",
properties: {
emailAddress: "a@b.com",
isEnabled: true,
password: "pwd",
},
},
resourceGroupName: "OneResourceGroupName",
resourceName: "samplebotname",
});
import pulumi
import pulumi_azure_native as azure_native
channel = azure_native.botservice.Channel("channel",
channel_name="EmailChannel",
location="global",
properties={
"channel_name": "EmailChannel",
"properties": {
"email_address": "a@b.com",
"is_enabled": True,
"password": "pwd",
},
},
resource_group_name="OneResourceGroupName",
resource_name_="samplebotname")
package main
import (
botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
ChannelName: pulumi.String("EmailChannel"),
Location: pulumi.String("global"),
Properties: &botservice.EmailChannelArgs{
ChannelName: pulumi.String("EmailChannel"),
Properties: &botservice.EmailChannelPropertiesArgs{
EmailAddress: pulumi.String("a@b.com"),
IsEnabled: pulumi.Bool(true),
Password: pulumi.String("pwd"),
},
},
ResourceGroupName: pulumi.String("OneResourceGroupName"),
ResourceName: pulumi.String("samplebotname"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var channel = new AzureNative.BotService.Channel("channel", new()
{
ChannelName = "EmailChannel",
Location = "global",
Properties = new AzureNative.BotService.Inputs.EmailChannelArgs
{
ChannelName = "EmailChannel",
Properties = new AzureNative.BotService.Inputs.EmailChannelPropertiesArgs
{
EmailAddress = "a@b.com",
IsEnabled = true,
Password = "pwd",
},
},
ResourceGroupName = "OneResourceGroupName",
ResourceName = "samplebotname",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.botservice.Channel;
import com.pulumi.azurenative.botservice.ChannelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var channel = new Channel("channel", ChannelArgs.builder()
.channelName("EmailChannel")
.location("global")
.properties(EmailChannelArgs.builder()
.channelName("EmailChannel")
.properties(EmailChannelPropertiesArgs.builder()
.emailAddress("a@b.com")
.isEnabled(true)
.password("pwd")
.build())
.build())
.resourceGroupName("OneResourceGroupName")
.resourceName("samplebotname")
.build());
}
}
resources:
channel:
type: azure-native:botservice:Channel
properties:
channelName: EmailChannel
location: global
properties:
channelName: EmailChannel
properties:
emailAddress: a@b.com
isEnabled: true
password: pwd
resourceGroupName: OneResourceGroupName
resourceName: samplebotname
The emailAddress property specifies where the bot receives messages. The password authenticates the bot with the email provider. This configuration uses basic authentication; for production deployments, consider OAuth authentication for improved security.
Enable email with OAuth authentication
For enhanced security, email channels can use OAuth instead of passwords, requiring a magic code from the provider’s OAuth flow.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const channel = new azure_native.botservice.Channel("channel", {
channelName: "EmailChannel",
location: "global",
properties: {
channelName: "EmailChannel",
properties: {
authMethod: 1,
emailAddress: "a@b.com",
isEnabled: true,
magicCode: "000000",
},
},
resourceGroupName: "OneResourceGroupName",
resourceName: "samplebotname",
});
import pulumi
import pulumi_azure_native as azure_native
channel = azure_native.botservice.Channel("channel",
channel_name="EmailChannel",
location="global",
properties={
"channel_name": "EmailChannel",
"properties": {
"auth_method": 1,
"email_address": "a@b.com",
"is_enabled": True,
"magic_code": "000000",
},
},
resource_group_name="OneResourceGroupName",
resource_name_="samplebotname")
package main
import (
botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
ChannelName: pulumi.String("EmailChannel"),
Location: pulumi.String("global"),
Properties: &botservice.EmailChannelArgs{
ChannelName: pulumi.String("EmailChannel"),
Properties: &botservice.EmailChannelPropertiesArgs{
AuthMethod: pulumi.Float64(1),
EmailAddress: pulumi.String("a@b.com"),
IsEnabled: pulumi.Bool(true),
MagicCode: pulumi.String("000000"),
},
},
ResourceGroupName: pulumi.String("OneResourceGroupName"),
ResourceName: pulumi.String("samplebotname"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var channel = new AzureNative.BotService.Channel("channel", new()
{
ChannelName = "EmailChannel",
Location = "global",
Properties = new AzureNative.BotService.Inputs.EmailChannelArgs
{
ChannelName = "EmailChannel",
Properties = new AzureNative.BotService.Inputs.EmailChannelPropertiesArgs
{
AuthMethod = 1,
EmailAddress = "a@b.com",
IsEnabled = true,
MagicCode = "000000",
},
},
ResourceGroupName = "OneResourceGroupName",
ResourceName = "samplebotname",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.botservice.Channel;
import com.pulumi.azurenative.botservice.ChannelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var channel = new Channel("channel", ChannelArgs.builder()
.channelName("EmailChannel")
.location("global")
.properties(EmailChannelArgs.builder()
.channelName("EmailChannel")
.properties(EmailChannelPropertiesArgs.builder()
.authMethod(1.0)
.emailAddress("a@b.com")
.isEnabled(true)
.magicCode("000000")
.build())
.build())
.resourceGroupName("OneResourceGroupName")
.resourceName("samplebotname")
.build());
}
}
resources:
channel:
type: azure-native:botservice:Channel
properties:
channelName: EmailChannel
location: global
properties:
channelName: EmailChannel
properties:
authMethod: 1
emailAddress: a@b.com
isEnabled: true
magicCode: '000000'
resourceGroupName: OneResourceGroupName
resourceName: samplebotname
The authMethod property set to 1 indicates OAuth authentication. The magicCode is obtained by completing the OAuth flow with your email provider. This approach avoids storing passwords directly in your configuration.
Integrate speech recognition with Cognitive Services
DirectLine Speech channels connect bots to Azure Cognitive Services for voice-based interactions with speech-to-text and text-to-speech capabilities.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const channel = new azure_native.botservice.Channel("channel", {
channelName: "DirectLineSpeechChannel",
location: "global",
properties: {
channelName: "DirectLineSpeechChannel",
properties: {
cognitiveServiceRegion: "XcognitiveServiceRegionX",
cognitiveServiceSubscriptionKey: "XcognitiveServiceSubscriptionKeyX",
isEnabled: true,
},
},
resourceGroupName: "OneResourceGroupName",
resourceName: "samplebotname",
});
import pulumi
import pulumi_azure_native as azure_native
channel = azure_native.botservice.Channel("channel",
channel_name="DirectLineSpeechChannel",
location="global",
properties={
"channel_name": "DirectLineSpeechChannel",
"properties": {
"cognitive_service_region": "XcognitiveServiceRegionX",
"cognitive_service_subscription_key": "XcognitiveServiceSubscriptionKeyX",
"is_enabled": True,
},
},
resource_group_name="OneResourceGroupName",
resource_name_="samplebotname")
package main
import (
botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
ChannelName: pulumi.String("DirectLineSpeechChannel"),
Location: pulumi.String("global"),
Properties: &botservice.DirectLineSpeechChannelArgs{
ChannelName: pulumi.String("DirectLineSpeechChannel"),
Properties: &botservice.DirectLineSpeechChannelPropertiesArgs{
CognitiveServiceRegion: pulumi.String("XcognitiveServiceRegionX"),
CognitiveServiceSubscriptionKey: pulumi.String("XcognitiveServiceSubscriptionKeyX"),
IsEnabled: pulumi.Bool(true),
},
},
ResourceGroupName: pulumi.String("OneResourceGroupName"),
ResourceName: pulumi.String("samplebotname"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var channel = new AzureNative.BotService.Channel("channel", new()
{
ChannelName = "DirectLineSpeechChannel",
Location = "global",
Properties = new AzureNative.BotService.Inputs.DirectLineSpeechChannelArgs
{
ChannelName = "DirectLineSpeechChannel",
Properties = new AzureNative.BotService.Inputs.DirectLineSpeechChannelPropertiesArgs
{
CognitiveServiceRegion = "XcognitiveServiceRegionX",
CognitiveServiceSubscriptionKey = "XcognitiveServiceSubscriptionKeyX",
IsEnabled = true,
},
},
ResourceGroupName = "OneResourceGroupName",
ResourceName = "samplebotname",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.botservice.Channel;
import com.pulumi.azurenative.botservice.ChannelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var channel = new Channel("channel", ChannelArgs.builder()
.channelName("DirectLineSpeechChannel")
.location("global")
.properties(DirectLineSpeechChannelArgs.builder()
.channelName("DirectLineSpeechChannel")
.properties(DirectLineSpeechChannelPropertiesArgs.builder()
.cognitiveServiceRegion("XcognitiveServiceRegionX")
.cognitiveServiceSubscriptionKey("XcognitiveServiceSubscriptionKeyX")
.isEnabled(true)
.build())
.build())
.resourceGroupName("OneResourceGroupName")
.resourceName("samplebotname")
.build());
}
}
resources:
channel:
type: azure-native:botservice:Channel
properties:
channelName: DirectLineSpeechChannel
location: global
properties:
channelName: DirectLineSpeechChannel
properties:
cognitiveServiceRegion: XcognitiveServiceRegionX
cognitiveServiceSubscriptionKey: XcognitiveServiceSubscriptionKeyX
isEnabled: true
resourceGroupName: OneResourceGroupName
resourceName: samplebotname
The cognitiveServiceRegion specifies where your Cognitive Services resource is deployed. The cognitiveServiceSubscriptionKey authenticates with Azure Speech Services. This channel enables voice conversations without building custom speech recognition infrastructure.
Connect to LINE messaging platform
LINE is a popular messaging platform in Asia. Connecting your bot requires channel credentials from the LINE Developers Console.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const channel = new azure_native.botservice.Channel("channel", {
channelName: "LineChannel",
location: "global",
properties: {
channelName: "LineChannel",
properties: {
lineRegistrations: [{
channelAccessToken: "channelAccessToken",
channelSecret: "channelSecret",
}],
},
},
resourceGroupName: "OneResourceGroupName",
resourceName: "samplebotname",
});
import pulumi
import pulumi_azure_native as azure_native
channel = azure_native.botservice.Channel("channel",
channel_name="LineChannel",
location="global",
properties={
"channel_name": "LineChannel",
"properties": {
"line_registrations": [{
"channel_access_token": "channelAccessToken",
"channel_secret": "channelSecret",
}],
},
},
resource_group_name="OneResourceGroupName",
resource_name_="samplebotname")
package main
import (
botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
ChannelName: pulumi.String("LineChannel"),
Location: pulumi.String("global"),
Properties: &botservice.LineChannelArgs{
ChannelName: pulumi.String("LineChannel"),
Properties: &botservice.LineChannelPropertiesArgs{
LineRegistrations: botservice.LineRegistrationArray{
&botservice.LineRegistrationArgs{
ChannelAccessToken: pulumi.String("channelAccessToken"),
ChannelSecret: pulumi.String("channelSecret"),
},
},
},
},
ResourceGroupName: pulumi.String("OneResourceGroupName"),
ResourceName: pulumi.String("samplebotname"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var channel = new AzureNative.BotService.Channel("channel", new()
{
ChannelName = "LineChannel",
Location = "global",
Properties = new AzureNative.BotService.Inputs.LineChannelArgs
{
ChannelName = "LineChannel",
Properties = new AzureNative.BotService.Inputs.LineChannelPropertiesArgs
{
LineRegistrations = new[]
{
new AzureNative.BotService.Inputs.LineRegistrationArgs
{
ChannelAccessToken = "channelAccessToken",
ChannelSecret = "channelSecret",
},
},
},
},
ResourceGroupName = "OneResourceGroupName",
ResourceName = "samplebotname",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.botservice.Channel;
import com.pulumi.azurenative.botservice.ChannelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var channel = new Channel("channel", ChannelArgs.builder()
.channelName("LineChannel")
.location("global")
.properties(LineChannelArgs.builder()
.channelName("LineChannel")
.properties(LineChannelPropertiesArgs.builder()
.lineRegistrations(LineRegistrationArgs.builder()
.channelAccessToken("channelAccessToken")
.channelSecret("channelSecret")
.build())
.build())
.build())
.resourceGroupName("OneResourceGroupName")
.resourceName("samplebotname")
.build());
}
}
resources:
channel:
type: azure-native:botservice:Channel
properties:
channelName: LineChannel
location: global
properties:
channelName: LineChannel
properties:
lineRegistrations:
- channelAccessToken: channelAccessToken
channelSecret: channelSecret
resourceGroupName: OneResourceGroupName
resourceName: samplebotname
The lineRegistrations array contains credentials for one or more LINE channels. Each registration includes a channelAccessToken and channelSecret obtained from LINE Developers. This enables your bot to send and receive messages on the LINE platform.
Beyond these examples
These snippets focus on specific channel-level features: voice and messaging platform integrations, email channel authentication methods, and speech recognition with Cognitive Services. They’re intentionally minimal rather than full bot deployments.
The examples reference pre-existing infrastructure such as Azure Bot Service bot resources, platform-specific credentials (Alexa skill IDs, LINE tokens, Cognitive Services keys), and email accounts or OAuth configurations. They focus on configuring the channel rather than provisioning the bot or external platform accounts.
To keep things focused, common channel patterns are omitted, including:
- Channel-specific advanced settings and callbacks
- Multi-region or failover configurations
- Webhook endpoints and custom routing
- Analytics and monitoring integration
These omissions are intentional: the goal is to illustrate how each channel type is wired, not provide drop-in messaging modules. See the Bot Service Channel resource reference for all available configuration options.
Let's configure Azure Bot Service Channels
Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.
Try Pulumi Cloud for FREEFrequently Asked Questions
Channel Types & Configuration
properties field.password, or OAuth using authMethod (set to 1) with a magicCode.cognitiveServiceRegion and cognitiveServiceSubscriptionKey to connect to Azure Cognitive Services.isEnabled property to true or false in the channel’s properties configuration. This property is available for Alexa, Email, and DirectLine Speech channels.Resource Properties & Immutability
channelName property is immutable. You must delete and recreate the channel resource to change the channel type.channelName (the channel type), resourceGroupName, and resourceName (the parent bot service name).location: "global" for channel configuration.API Versions & Compatibility
pulumi package add azure-native botservice [ApiVersion].Using a different cloud?
Explore integration guides for other cloud providers: