Package: botframework-connector
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.How to Installpipinstallbotframework-connectorHow to UseAuthenticationYour 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/en-us/bot-framework/rest-api/bot-framework-rest-connector-authenticationExampleClient creation (with authentication), conversation initialization and activity send to user.frombotbuilder.schemaimport*frombotframework.connectorimportConnectorClientfrombotframework.connector.authimportMicrosoftAppCredentialsAPP_ID='<your-app-id>'APP_PASSWORD='<your-app-password>'SERVICE_URL='https://slack.botframework.com'CHANNEL_ID='slack'BOT_ID='<bot-id>'RECIPIENT_ID='<user-id>'credentials=MicrosoftAppCredentials(APP_ID,APP_PASSWORD)connector=ConnectorClient(credentials,base_url=SERVICE_URL)conversation=connector.conversations.create_conversation(ConversationParameters(bot=ChannelAccount(id=BOT_ID),members=[ChannelAccount(id=RECIPIENT_ID)]))connector.conversations.send_to_conversation(conversation.id,Activity(type=ActivityTypes.message,channel_id=CHANNEL_ID,recipient=ChannelAccount(id=RECIPIENT_ID),from_property=ChannelAccount(id=BOT_ID),text='Hello World!'))Rest API DocumentationFor the Connector Service API Documentation, please see ourAPI reference.Documentation/WikiYou can find more information on the botbuilder-python project by visiting ourWiki.RequirementsPython >= 3.7.0Source CodeThe latest developer version is available in a github repository:https://github.com/Microsoft/botbuilder-python/ContributingThis 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, visithttps://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 theMicrosoft Open Source Code of Conduct.
For more information see theCode of Conduct FAQor
contactopencode@microsoft.comwith any additional questions or comments.Reporting Security IssuesSecurity issues and bugs should be reported privately, via email, to the Microsoft Security
Response Center (MSRC) atsecure@microsoft.com. You should
receive a response within 24 hours. If for some reason you do not, please follow up via
email to ensure we received your original message. Further information, including theMSRC PGPkey, can be found in
theSecurity TechCenter.LicenseCopyright (c) Microsoft Corporation. All rights reserved.Licensed under theMITLicense.