<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aura – </title>
    <link>/docs/components/channels/communication-protocols/</link>
    <description>Recent content on Aura</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="/docs/components/channels/communication-protocols/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/channels/communication-protocols/microsoft-bot-service/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/channels/communication-protocols/microsoft-bot-service/</guid>
      <description>
        
        
        &lt;h1 id=&#34;direct-line-communication-protocol&#34;&gt;Direct Line communication protocol&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of useful concepts to understand the Microsoft Direct Line protocol used by channels to communicate with Aura&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Aura platform is based on &lt;a href=&#34;https://azure.microsoft.com/en-us/services/bot-services/&#34;&gt;&lt;strong&gt;Microsoft Azure Bot Service&lt;/strong&gt;&lt;/a&gt; and &lt;strong&gt;Bot Framework&lt;/strong&gt;. Both provide tools to build, test, deploy, and manage intelligent bots all in one place. Through the use of a modular and extensible framework provided by the SDK, tools, templates and AI services, developers can create bots that use speech, understand natural language, handle questions and answers, and more.&lt;/p&gt;
&lt;p&gt;One of the key capabilities of the &lt;strong&gt;Microsoft Azure Bot Service&lt;/strong&gt; and &lt;strong&gt;Bot Framework&lt;/strong&gt; is the &lt;strong&gt;integration of channels the final users can use to interact with the concrete bot instances&lt;/strong&gt; implemented using this service and framework. This way, no matter which channel the final users interact with a concrete bot instance, they all are able to establish intelligent conversations with the bot.&lt;/p&gt;
&lt;p&gt;Since the &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt; leans on the Microsoft Azure Bot Service and Bot Framework, channels that use Direct Line communication protocol can &amp;ldquo;talk&amp;rdquo; to Aura and integrate with it, becoming Aura custom channels.&lt;/p&gt;
&lt;h2 id=&#34;direct-line-api&#34;&gt;Direct Line API&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Microsoft Azure Bot Service&lt;/strong&gt; exposes a general-purpose mechanism that channel developers can use when implementing or integrating new channels. This general-purpose communication mechanism is called &lt;a href=&#34;https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-api-reference?view=azure-bot-service-4.0&#34;&gt;&lt;strong&gt;Direct Line API&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Direct Line API&lt;/strong&gt; exposes a Web endpoint or URL of a service hosted in the Microsoft Azure cloud that channel developers can use to send messages directly to concrete instances of bot engines hosted in the Microsoft Azure Bot Service. This way, the &lt;strong&gt;Direct Line API&lt;/strong&gt; provides a link between any third-party software component or application, typically used by the final user, and the concrete instance of the bot engine she may be willing to interact with.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/channels/direct-line-api.png&#34; alt=&#34;Direct Line API&#34;&gt;&lt;/p&gt;
&lt;p&gt;Typically, channels accessing through &lt;strong&gt;Direct Line&lt;/strong&gt; to a bot send their requests calling the &lt;code&gt;POST HTTP&lt;/code&gt; method of the &lt;code&gt;/conversations/activities&lt;/code&gt; endpoint and, as it is an asynchronous API, read the responses from a WebSocket, which URL is obtained when requesting the &lt;a href=&#34;#token&#34;&gt;token&lt;/a&gt; to access de API.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/channels/direct-line-sequence-diagram.png&#34; alt=&#34;Direct Line sequence diagram&#34;&gt;&lt;/p&gt;
&lt;p&gt;The general-purpose communication means exposed by the &lt;strong&gt;Direct Line API&lt;/strong&gt; constitutes an additional mechanism channel developers and integrators can use to create as well as to integrate new channels Telefónica clients can use to interact with Aura. Thanks to it, any communication means can be integrated as an Aura channel.&lt;/p&gt;
&lt;p&gt;The only thing which is needed is the proper transformation of the messages coming in and out of the concrete communication means as HTTP messages sent and received through the &lt;strong&gt;Direct Line API&lt;/strong&gt; endpoint available at the Microsoft Azure cloud. This procedure is depicted in the following figure:&lt;/p&gt;
&lt;h2 id=&#34;token&#34;&gt;How to obtain a valid Direct Line token for Aura Groot&lt;/h2&gt;
&lt;p&gt;The objective of this document is to explain how an Aura&amp;rsquo;s channel might access the API that allows generating a Direct Line token valid for an Aura&amp;rsquo;s environment.&lt;/p&gt;
&lt;p&gt;Channels are required to use tokens to communicate with &lt;strong&gt;Direct Line API&lt;/strong&gt;. Each of those tokens is valid for one conversation (and one user) and until it expires (usually in one hour). If further interaction is required after the expiration, the token must be refreshed (get a new fresh version of the token with a later expiration time, calling directly to &lt;strong&gt;Direct Line API&lt;/strong&gt;) before the previous valid token is expired. More information about token refreshing can be found in &lt;a href=&#34;https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-authentication?view=azure-bot-service-4.0#refresh-token&#34;&gt;Direct Line documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The first Direct Line token for each conversation must be obtained from &lt;a href=&#34;../../../../docs/components/aura-authentication-api/&#34;&gt;&lt;em&gt;&lt;strong&gt;aura-authentication-api&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;. To use this API, a valid Aura APIkey is required:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;integration environments&lt;/strong&gt;, please ask it to Aura Global Operation Team.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;preproduction&lt;/strong&gt; and &lt;strong&gt;production environments&lt;/strong&gt;, the OB Operation Team should provide it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The API definition can be found in section &lt;code&gt;Directline Token&lt;/code&gt; in &lt;a href=&#34;../../../../docs/components/aura-authentication-api/api-definition/aura-authentication-api/&#34;&gt;&lt;em&gt;&lt;strong&gt;aura-authentication-api&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;. Note that there are two ways to ask for a token, one to get only the token (&lt;code&gt;/token&lt;/code&gt;), and another one to get also the stream URL (&lt;code&gt;/token/wss&lt;/code&gt;), this is the recommended one as it includes the WebSocket stream URL in the response.&lt;/p&gt;
&lt;p&gt;The corresponding Operations Team should also provide the specific domain names where this API is published in each environment.&lt;/p&gt;
&lt;h3 id=&#34;request-examples&#34;&gt;Request examples&lt;/h3&gt;
&lt;p&gt;Token only:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl -X GET \
  https://svc-&amp;lt;env&amp;gt;.auracognitive.com/aura-services/v1/token \
  -H &amp;#39;Authorization: APIKEY &amp;lt;YOUR-API-KEY&amp;gt;&amp;#39; \
  -H &amp;#39;correlator: &amp;lt;CORR_UUID&amp;gt;&amp;#39; \
  -H &amp;#39;cache-control: no-cache&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Token with web socket:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;curl -X GET \
  https://svc-&amp;lt;env&amp;gt;.auracognitive.com/aura-services/v1/token/wss \
  -H &amp;#39;Authorization: APIKEY &amp;lt;YOUR-API-KEY&amp;gt;&amp;#39; \
  -H &amp;#39;correlator: &amp;lt;CORR_UUID&amp;gt;&amp;#39; \
  -H &amp;#39;cache-control: no-cache&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note that &lt;code&gt;correlator&lt;/code&gt; header is optional, but it is convenient to send it, to track requests when it is necessary.&lt;/p&gt;
&lt;h3 id=&#34;response-examples&#34;&gt;Response examples&lt;/h3&gt;
&lt;p&gt;These responses are returned by Direct Line servers and passed directly to the channel. The value of the field &lt;code&gt;expires_in&lt;/code&gt; depends on what is returned by Direct Line, and it could have any numeric value, mainly &lt;code&gt;1800&lt;/code&gt; or &lt;code&gt;3600&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The examples contain developed tokens already expired, so they cannot be used in real environments. A request with a valid APIkey must be done in order to get a real valid token.&lt;/p&gt;
&lt;p&gt;Token only:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;token&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;ew0KICAiYWxnIjogIlJTMjU2IiwNCiAgImtpZCI6ICJodjRaemR0eXI1OXA3R1BSMEsycmhIUmJuUTQiLA0KICAieDV0IjogImh2NFp6ZHR5cjU5cDdHUFIwSzJyaEhSYm5RNCIsDQogICJ0eXAiOiAiSldUIg0KfQ.ew0KICAiYm90IjogIkJPVC1hdXJhLWFwLW5leHQiLA0KICAic2l0ZSI6ICJfLTJWLU9ocVl2NCIsDQogICJjb252IjogIklHUDR1N1VqR3V1SDA2TmZTSWV2dHktZXUiLA0KICAibmJmIjogMTY0OTc0NjA4MSwNCiAgImV4cCI6IDE2NDk3NDk2ODEsDQogICJpc3MiOiAiaHR0cHM6Ly9kaXJlY3RsaW5lLmJvdGZyYW1ld29yay5jb20vIiwNCiAgImF1ZCI6ICJodHRwczovL2RpcmVjdGxpbmUuYm90ZnJhbWV3b3JrLmNvbS8iDQp9.eZKIPviIA5WwtXPh3LEhD5je1bRR3svGom6KjhwKZpjv4HMCDmblspQSJ-Ax3G51jsZyU_NZM1HRvLweyfBC3TixlIPnLLQ2j55-ZUGQobVTVop84H3QRhUE13GwYPVrvgr_tRsqPTLlUMd7O9zpk5mZ_T-esMQXBwB51izTHRLExFAwDc1jIjV-FWJAQt6ROEZIqWJAMQ6WKuCsm1HXaa0NbCASq90cdZJZc_hyDeengrFklcIiXuzcoFYs3SNKBMCiYuHAWgYGWT6aHpWvreCjEo2VdkcJYkpweaBeagFRzftE3tyzDsb_QrNMrxrWuu5OXPi4j0r7avivL3ap-w&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;expires_in&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;3600&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Token with web socket:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;conversationId&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Da8BzFBhRMbDpcEN8mjqdn-eu&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;token&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;ew0KICAiYWxnIjogIlJTMjU2IiwNCiAgImtpZCI6ICJodjRaemR0eXI1OXA3R1BSMEsycmhIUmJuUTQiLA0KICAieDV0IjogImh2NFp6ZHR5cjU5cDdHUFIwSzJyaEhSYm5RNCIsDQogICJ0eXAiOiAiSldUIg0KfQ.ew0KICAiYm90IjogIkJPVC1hdXJhLWFwLW5leHQiLA0KICAic2l0ZSI6ICI4bVJVUmZyMEVxYyIsDQogICJjb252IjogIkRhOEJ6RkJoUk1iRHBjRU44bWpxZG4tZXUiLA0KICAibmJmIjogMTY0OTc0ODU4OCwNCiAgImV4cCI6IDE2NDk3NTIxODgsDQogICJpc3MiOiAiaHR0cHM6Ly9kaXJlY3RsaW5lLmJvdGZyYW1ld29yay5jb20vIiwNCiAgImF1ZCI6ICJodHRwczovL2RpcmVjdGxpbmUuYm90ZnJhbWV3b3JrLmNvbS8iDQp9.wGpPdShRoHf3M7zlTJO9nHyxD8bWF-3JeM7gd0BtrFLDCVEznO1j9Y2ovzRxmeJL8l4xo7T5tH538jAivexelpDb3VET7UvrhZVTNa19J7oOL-eqGtbspYoKp_2xzVNxm2w2lB5cRZVMfyzlvLptfx_-BD2XeohbYGbl_pnmLe6N-490h1S5bE613t1p4bYD1bPA0IKeGhhaiUUBMcA5mCO84eurYesLECAz3T5mCgLP2Xfq7FCeiFmxO4DiEZujKh5FSKd9Gp076ADHdIxxilvKdTFlXykx_v4-yx0xm8YoyHChyRIF9hEzX4dm6hsWLYsgCiM-t60I32_KSRJWxg&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;expires_in&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;3600&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;streamUrl&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;wss://directline.botframework.com/v3/directline/conversations/Da8BzFBhRMbDpcEN8mjqdn-eu/stream?watermark=-&amp;amp;t=ew0KICAiYWxnIjogIlJTMjU2IiwNCiAgImtpZCI6ICJodjRaemR0eXI1OXA3R1BSMEsycmhIUmJuUTQiLA0KICAieDV0IjogImh2NFp6ZHR5cjU5cDdHUFIwSzJyaEhSYm5RNCIsDQogICJ0eXAiOiAiSldUIg0KfQ.ew0KICAiYm90IjogIkJPVC1hdXJhLWFwLW5leHQiLA0KICAic2l0ZSI6ICI4bVJVUmZyMEVxYyIsDQogICJjb252IjogIkRhOEJ6RkJoUk1iRHBjRU44bWpxZG4tZXUiLA0KICAibmJmIjogMTY0OTc0ODU4OCwNCiAgImV4cCI6IDE2NDk3NDg2NDgsDQogICJpc3MiOiAiaHR0cHM6Ly9kaXJlY3RsaW5lLmJvdGZyYW1ld29yay5jb20vIiwNCiAgImF1ZCI6ICJodHRwczovL2RpcmVjdGxpbmUuYm90ZnJhbWV3b3JrLmNvbS8iDQp9.ctcwxvoyi8EdSee3x3TOogvy8puphmpsn8wouTaPZzFaVFb4YcuE-336e4bg99uCPffHAlVPLBc8xpVjeM4JdDQWncO-TpPFlj7fM_x_YmunlVLS4OsNspnMQ9lUgn6FLBD9GUdJ5GRySOltrDbsoHI0EMaljs2ni6b8ZQ9LKFdY8QyAKRqS9Eto1_MCiPmuseM_KM8VtL2fZMmhzwfhxf7dOHbEtu121Nj8LTxZTNI1f5gpKsEuw6neX1g7MQyrD-ajr0s-hD90g5r79vQvompVzFf3LgoXsMdKLIgz8PkVg6hIJwQFIC4piSHV7--g8k-alJ-XMspNGBCeD3dVfw&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;&amp;#34;referenceGrammarId&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;f4d20b6f-6e5c-175e-abdf-e9eb65e5d058&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;api-errors-handling&#34;&gt;API errors handling&lt;/h3&gt;
&lt;p&gt;The aim of this endpoint is to allow the channels to obtain a valid token to access Direct Line API without sharing the primary keys of the bot with all of them. So, basically, the endpoint just wraps the requests to Direct Line API, this includes that all the errors returned by Direct Line API are returned to the caller.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status Code&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Recommended action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;td&gt;Error in the request. It could be an error in the request of the channel to Aura, or in Aura&amp;rsquo;s request to Direct Line.&lt;/td&gt;
&lt;td&gt;Validate the request being launched. If it seems to be ok, request a validation of the logs in the corresponding Aura environment.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;401&lt;/td&gt;
&lt;td&gt;Invalid credentials. It could be an error in the APIKey or in the &lt;em&gt;&lt;strong&gt;aura-authentication-api&lt;/strong&gt;&lt;/em&gt; configuration.&lt;/td&gt;
&lt;td&gt;Validate if your APIKey is valid. Request a validation of the logs in the corresponding Aura environment.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;429&lt;/td&gt;
&lt;td&gt;Too many requests. Direct Line service is having too many requests to get a valid token for this bot.&lt;/td&gt;
&lt;td&gt;An exponential backoff system must be implemented to avoid making the situation worse. So, you should wait for 30 seconds before launching a new request. If this gets a 429 again, you should wait for 1 minute, then 2 minutes, etc. Consider that in order to avoid this situation, all the requests of your users must be taken into account all together.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;td&gt;Internal error.&lt;/td&gt;
&lt;td&gt;Wait for the server to recover, but request to Aura Operations Team of the environment the resolution of the issue.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;i class=&#34;fa-solid fa-triangle-exclamation fa-xl&#34; style=&#34;color: #f45815;&#34;&gt;&lt;/i&gt; Only the body and the status code of the response of Direct Line are returned to the caller, none of the headers are included.&lt;/p&gt;
&lt;h2 id=&#34;using-the-token-calling-direct-line-api&#34;&gt;Using the token: calling Direct Line API&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;HTTP GET&lt;/code&gt; requests made by the channel (to send or receive activities) will be authorized by a token (the first one, or after refresh) through the &lt;code&gt;Authorization&lt;/code&gt; header, for instance:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;POST https://directline.botframework.com/v3/directline/conversations/&amp;lt;CONV_ID&amp;gt;/activities
Authorization: Bearer &amp;lt;YOUR_TOKEN&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To get activities through a web socket, the channel must use the stream URL obtained in &lt;code&gt;/token/wss&lt;/code&gt;. The token is sent in &lt;code&gt;t&lt;/code&gt; param, and it will expire after one minute after the token request.&lt;/p&gt;
&lt;p&gt;Once connected the web socket, it will get activities for one hour. After that time, a new token (through refreshing) and a new web socket connection are required, setting the fresh token within the &lt;code&gt;t&lt;/code&gt; param in stream URL, for instance:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;wss://directline.botframework.com/v3/directline/conversations/&amp;lt;CONV_ID&amp;gt;/stream?watermark=-&amp;amp;t=&amp;lt;NEW_TOKEN&amp;gt;&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;i class=&#34;fa-solid fa-triangle-exclamation fa-xl&#34; style=&#34;color: #f45815;&#34;&gt;&lt;/i&gt; Note that refresh token must be obtained &lt;strong&gt;before&lt;/strong&gt; current token is expired.&lt;/p&gt;
&lt;h2 id=&#34;full-communication-flow&#34;&gt;Full communication flow&lt;/h2&gt;
&lt;p&gt;The flow to get the first token, and optionally refresh it, for conversations longer than one hour, is as follows:&lt;/p&gt;
&lt;pre class=&#34;mermaid&#34;&gt;sequenceDiagram

Channel -&amp;gt;&amp;gt; Auth API: Get Wss token (API key)
Auth API -&amp;gt;&amp;gt; Direct Line: Start conversation (app token)
Direct Line -&amp;gt;&amp;gt; Auth API: {conversationId, token, expires_in, streamUrl}
Auth API -&amp;gt;&amp;gt; Channel: {conversationId, token, expires_in, streamUrl}
loop send / receive activities during one hour
  Channel --&amp;gt;&amp;gt; Direct Line: POST /conversation/activities (token)
  Direct Line --&amp;gt;&amp;gt; Channel: [activities]
end

alt refresh token
  Channel -&amp;gt;&amp;gt; Direct Line: Refresh (token)
  Direct Line -&amp;gt;&amp;gt; Channel: new_token
  loop send / receive activities during one hour
    Channel --&amp;gt;&amp;gt; Direct Line: POST /conversation/activities (new_token)
    Direct Line --&amp;gt;&amp;gt; Channel: [activities]
  end
else
  Channel --&amp;gt;&amp;gt; Direct Line: POST /conversation/activities (token)
  Direct Line --&amp;gt;&amp;gt; Channel: Token expired (403)
end&lt;/pre&gt;
&lt;p&gt;&lt;i class=&#34;fa-solid fa-triangle-exclamation fa-xl&#34; style=&#34;color: #f45815;&#34;&gt;&lt;/i&gt; Note that the sending of activities from Direct Line to the channel may be through a web socket (if opened) or &lt;code&gt;HTTP GET&lt;/code&gt; request from channel.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/components/channels/communication-protocols/auraline/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/channels/communication-protocols/auraline/</guid>
      <description>
        
        
        &lt;h1 id=&#34;auraline-communication-protocol&#34;&gt;Auraline communication protocol&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of the Auraline communication protocol used by channels to communicate with Aura&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Related documents&lt;/strong&gt;&lt;br&gt;
&lt;i class=&#34;fa-regular fa-file-lines fa-xl&#34; style=&#34;color: #0d5de7;&#34;&gt;&lt;/i&gt; &lt;a href=&#34;../../../../docs/developers-workspace/channels-management/connect-channel-auraline/&#34;&gt;Guidelines for connecting a channel to Auraline&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Aura Platform Team has developed a new communication protocol named &lt;strong&gt;Auraline&lt;/strong&gt;. This is a proprietary protocol, developed and exclusively owned by Aura Platform Team for facilitating communication between channels and Aura. &lt;strong&gt;Auraline&lt;/strong&gt; is based on Microsoft &lt;strong&gt;Direct Line&lt;/strong&gt; and can be considered as a local implementation of the Microsoft protocol, eliminating dependencies on &lt;strong&gt;Microsoft Azure Bot Service&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This particularity provides significant advantages, including cost saving, higher flexibility and the ability to plan future developments according to our specific needs. Additionally, it enables us to address new backend-to-backend scenarios, such as managing a channels aggregator system or responding across multiple channels or applications instead of a single one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Auraline&lt;/strong&gt; facilitates the process for integrating new channels into the communication framework. Moreover, it enables an easy transition for channels that are currently integrated into Direct Line, minimizing disruptions and maximizing interoperability.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Auraline&lt;/strong&gt; uses &lt;a href=&#34;../../../../docs/components/request-response-model/channeldata-v3/&#34;&gt;Aura request-response semantic model v3&lt;/a&gt;, implemented by the normalized version of the property &lt;code&gt;channelData&lt;/code&gt; v3.&lt;/p&gt;
&lt;h2 id=&#34;communication-protocol&#34;&gt;Communication protocol&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Auraline&lt;/strong&gt; facilitates the communication of a channel with &lt;em&gt;&lt;strong&gt;aura-bridge&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;, consequently establishing a connection with the skills connected to &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt;. To enable this communication, specific &lt;a href=&#34;../../../../docs/components/aura-bridge/bridge-components/plugins/&#34;&gt;plugins&lt;/a&gt; and &lt;a href=&#34;../../../../docs/components/aura-bridge/api-definition/&#34;&gt;swaggers&lt;/a&gt; are developed in &lt;em&gt;&lt;strong&gt;aura-bridge&lt;/strong&gt;&lt;/em&gt; to support this protocol.&lt;/p&gt;
&lt;p&gt;Given its foundation on the Microsoft &lt;strong&gt;Direct Line&lt;/strong&gt; protocol, &lt;strong&gt;Auraline&lt;/strong&gt; adopts the &lt;strong&gt;Direct Line&lt;/strong&gt; JSON format and integrates the same basic processes as those in Microsoft framework:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Management of conversations and token&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creation of a conversation: It provides back a conversationId and a token.&lt;/li&gt;
&lt;li&gt;Refreshing of non-expired tokens&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Management of sent and received messages&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sending messages from users to the bot, utilizing the conversationId and the token.&lt;/li&gt;
&lt;li&gt;Sending messages from the bot to users, through the publication by the channel of a callback where these messages are received.&lt;/li&gt;
&lt;li&gt;Sending status of messages to notify the correct reception by the user or an error status.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As previously mentioned, &lt;strong&gt;Auraline&lt;/strong&gt; relies on our &lt;a href=&#34;../../../../docs/components/request-response-model/channeldata-v3/&#34;&gt;request-response semantic model v3&lt;/a&gt;. The communication between &lt;em&gt;&lt;strong&gt;aura-groot&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;aura-bridge&lt;/strong&gt;&lt;/em&gt; will always use the &lt;a href=&#34;../../../../docs/components/aura-bot-platform/response-message-formats/single-message/&#34;&gt;single message response format&lt;/a&gt; in order to simplify the integration and ensure the orderly delivery of responses to the users.&lt;/p&gt;
&lt;p&gt;Responses between &lt;em&gt;&lt;strong&gt;aura-bridge&lt;/strong&gt;&lt;/em&gt; and the channel will include an array of activities in a unique answer for each message, that will be orderly delivered to the channel.&lt;/p&gt;
&lt;p&gt;The following figure shows the sequence diagram of &lt;strong&gt;Auraline&lt;/strong&gt; communication protocol:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/channels/auraline-sequence-diagram.png&#34; alt=&#34;Direct Line API&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;specific-scenario-for-the-use-of-auraline-communication-protocol-ccaas&#34;&gt;Specific scenario for the use of Auraline communication protocol: CCaaS&lt;/h2&gt;
&lt;p&gt;The development of &lt;strong&gt;Auraline&lt;/strong&gt; communication protocol is initially aimed at resolving the scenario in which different channels are grouped together in a CCaaS (call-center as a service) that acts as a channel concentrator.&lt;/p&gt;
&lt;p&gt;This scenario is schematically shown in the following figure:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/channels/comm-protocols-ccaas.png&#34; alt=&#34;Communication protocols with call-center&#34;&gt;&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
