botbuilder-dotnet/libraries/Microsoft.Bot.Schema
Eric Dahlvang e62ee34273
Add Ephemeral to DeliveryModes, update comments (#3522)
2020-03-09 12:49:51 -07:00
..
Teams change constrcutor back, mark obsolete 2020-03-06 11:04:24 -08:00
AadResourceUrls.cs Updated Token API based on latest Swagger 2019-01-11 13:58:53 -08:00
ActionTypes.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
Activity.cs Add Ephemeral to DeliveryModes, update comments (#3522) 2020-03-09 12:49:51 -07:00
ActivityEx.cs [DCR] Normalize all expression and add '=' to force expression. (#3253) 2020-01-17 16:00:34 -08:00
ActivityExtensions.cs Added support for bot names with special characters (#3107) 2019-12-19 18:35:55 -08:00
ActivityImportance.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ActivityTypes.cs update with SendConversationHistory 2018-08-25 09:36:17 -07:00
ActivityTypesEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
AnimationCard.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
Attachment.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
AttachmentData.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
AttachmentEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
AttachmentInfo.cs update schema 0731 2018-08-03 14:39:46 -07:00
AttachmentLayoutTypes.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
AttachmentView.cs Latest swagger updates 2019-06-06 17:07:49 -07:00
AudioCard.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
BasicCard.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
CardAction.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
CardActionEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
CardEx.cs Warnings fix group 15. 2019-08-21 16:24:11 -07:00
CardImage.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ChannelAccount.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
ChannelAccountEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
ContactRelationUpdateActionTypes.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ContentTypes.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
ConversationAccount.cs Latest swagger updates 2019-06-06 17:07:49 -07:00
ConversationAccountEx.cs Warnings fix group 11. 2019-08-20 17:31:41 -07:00
ConversationMembers.cs autogenerated swagger 2018-04-07 19:58:22 -07:00
ConversationParameters.cs Add fields to the schema, refactor code acording to new service 2019-02-11 12:30:07 -03:00
ConversationReference.cs Undo schema changes, modify code according to future service modifications 2019-02-06 16:47:37 -03:00
ConversationReferenceEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
ConversationResourceResponse.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ConversationsResult.cs autogenerated swagger 2018-04-07 19:58:22 -07:00
DeliveryModes.cs Add Ephemeral to DeliveryModes, update comments (#3522) 2020-03-09 12:49:51 -07:00
EndOfConversationCodes.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
Entity.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
EntityEx.cs add ruleset to solution 2019-07-13 10:31:31 -07:00
Error.cs update schema 0731 2018-08-03 14:39:46 -07:00
ErrorCodes.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
ErrorResponse.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ExpectedReplies.cs Add ExpectedReplies 2020-03-07 10:47:36 -08:00
Fact.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
GeoCoordinates.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
GeoCoordinatesEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
HeroCard.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
IActivity.cs Latest swagger updates 2019-06-06 17:07:49 -07:00
IContactRelationUpdateActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IConversationUpdateActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IEndOfConversationActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IEventActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IHandoffActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IInstallationUpdateActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IInvokeActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IMessageActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IMessageDeleteActivity.cs Warnings fix group 11. 2019-08-20 17:31:41 -07:00
IMessageReactionActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
IMessageUpdateActivity.cs work in progress 2018-07-05 16:19:26 -07:00
ISuggestionActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
ITraceActivity.cs Merge master into 4.Future 2019-09-17 18:03:41 -07:00
ITypingActivity.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
InnerHttpError.cs update schema 0731 2018-08-03 14:39:46 -07:00
InputHints.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
InstallationUpdateActionTypes.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
MediaCard.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
MediaEventValue.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
MediaUrl.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
Mention.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
MentionEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
MessageReaction.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
MessageReactionTypes.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
Microsoft.Bot.Schema.csproj Update to Microsoft.SourceLink.GitHub (#3389) 2020-02-14 09:35:37 -08:00
MicrosoftPayMethodData.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
MicrosoftPayMethodDataEx.cs Warnings fix group 11. 2019-08-20 17:31:41 -07:00
OAuthCard.cs Schema objects for SSO token exchange 2020-01-09 09:48:42 -08:00
PagedMembersResult.cs update schema 0731 2018-08-03 14:39:46 -07:00
PaymentAddress.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentCurrencyAmount.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentDetails.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentDetailsModifier.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentItem.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentMethodData.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentOperations.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentOptions.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentRequest.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentRequestComplete.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentRequestCompleteResult.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentRequestEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
PaymentRequestUpdate.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentRequestUpdateResult.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentResponse.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentShippingOption.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
PaymentShippingTypes.cs Obsoleted payment schemas (#3054) 2019-12-03 13:57:47 -08:00
Place.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
PlaceEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
README.md Streaming: Rename StreamingExtensions -> Streaming, move projects around, rename projects and folders for consistency with the rest of the SDJ 2019-09-27 13:16:43 -07:00
ReceiptCard.cs update with label/valueType 2018-04-09 21:02:28 -07:00
ReceiptItem.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ResourceResponse.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
RoleTypes.cs autogenerated swagger 2018-04-07 19:58:22 -07:00
SemanticAction.cs Remove state prameter from SemanticAction constructor and callerId from Activity constructor. 2019-06-06 20:28:55 -07:00
SemanticActionStates.cs Latest swagger updates 2019-06-06 17:07:49 -07:00
SignInConstants.cs Removed interfaces changes 2020-02-14 14:22:30 -08:00
SignInResource.cs Work with new swagger 2020-01-27 13:27:55 -08:00
SigninCard.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
SigninCardEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
SuggestedActions.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
SuggestedActionsEx.cs Fix StyleCop Warnings in Bot.Schema (#1502) 2019-03-26 16:13:58 -07:00
TextFormatTypes.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
TextHighlight.cs update schema 0731 2018-08-03 14:39:46 -07:00
Thing.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ThumbnailCard.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
ThumbnailUrl.cs split connector into schema and connector packages 2018-01-30 20:47:10 -08:00
TokenExchangeInvokeRequest.cs Removed interfaces changes 2020-02-14 14:22:30 -08:00
TokenExchangeInvokeResponse.cs Removed interfaces changes 2020-02-14 14:22:30 -08:00
TokenExchangeRequest.cs Connector changes for new API 2020-01-08 14:04:22 -08:00
TokenExchangeResource.cs Regenerated swagger 2020-01-27 13:14:44 -08:00
TokenExchangeState.cs Update token exchange state 2020-02-10 12:43:47 -08:00
TokenPollingSettings.cs CR feedback 2019-10-03 10:03:56 -07:00
TokenRequest.cs autogenerated swagger 2018-04-07 19:58:22 -07:00
TokenResponse.cs Work with new swagger 2020-01-27 13:27:55 -08:00
TokenStatus.cs Updated Token API based on latest Swagger 2019-01-11 13:58:53 -08:00
Transcript.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
VideoCard.cs regen Swagger components, add autorest.csharp as a pinned devDep 2018-12-03 11:25:39 -08:00
icon.png fix all warnings and clean up package iconurl and nuget definitions 2019-10-10 10:15:02 -07:00

README.md

Microsoft Bot Framework Connector for .NET

Within the Bot Framework, the Bot Connector service enables your bot to exchange messages with users on channels that are configured in the Bot Framework Portal.

Target Frameworks:

  • .NET Framework 4.5.2
  • .NET Standard 2.0, based on the NetCore framework

How to Install

PM> Install-Package Microsoft.Bot.Connector

How to Use

Authentication

Your bot communicates with the Bot Connector service using HTTP over a secured channel (SSL/TLS). When your bot sends a request to the Connector service, it must include information that the Connector service can use to verify its identity.

To authenticate the requests, you'll need configure the Connector with the App ID and password that you obtained for your bot during registration and the Connector will handle the rest.

More information: https://docs.microsoft.com/bot-framework/rest-api/bot-framework-rest-connector-authentication

Example

Client creation (with authentication), conversation initialization and activity send to user.

var credentials = new MicrosoftAppCredentials("<your-app-id>", "<your-app-password>");
var serviceUri = new Uri("https://slack.botframework.com", UriKind.Absolute);
var bot = new ChannelAccount() { Id = "<bot-id>" };
var user = new ChannelAccount() { Id = "<user-id>" };

var activity = new Activity()
{
    Type = ActivityTypes.Message,
    Recipient = user,
    FromProperty = bot,
    Text = "This a message from Bot Connector Client (.Net)"
};

var param = new ConversationParameters()
{
    Members = new ChannelAccount[] { user },
    Bot = bot
};

using (var client = new ConnectorClient(serviceUri, credentials))
{
    var conversation = await client.Conversations.CreateConversationAsync(param);
    var response = await client.Conversations.SendToConversationAsync(conversation.Id, activity);
}

Simple EchoBot Example (source code)

EchoBot is a minimal bot that recieves message activities and replies with the same content. The sample shows how to use a WebAPI Controller for listening to activities and the ConnectorClient for sending activities.

Rest API Documentation

For the Connector Service API Documentation, please see our API reference.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.