{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4317","repository_url":"https://api.github.com/repos/Microsoft/BotBuilder","labels_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4317/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4317/comments","events_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4317/events","html_url":"https://github.com/Microsoft/BotBuilder/issues/4317","id":305362765,"number":4317,"title":"Unity Direct Line interface returning [400] 'Missing Property, Invalid or missing activities in http body'","user":{"login":"RarCeth","id":15726265,"avatar_url":"https://avatars1.githubusercontent.com/u/15726265?v=4","gravatar_id":"","url":"https://api.github.com/users/RarCeth","html_url":"https://github.com/RarCeth","followers_url":"https://api.github.com/users/RarCeth/followers","following_url":"https://api.github.com/users/RarCeth/following{/other_user}","gists_url":"https://api.github.com/users/RarCeth/gists{/gist_id}","starred_url":"https://api.github.com/users/RarCeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RarCeth/subscriptions","organizations_url":"https://api.github.com/users/RarCeth/orgs","repos_url":"https://api.github.com/users/RarCeth/repos","events_url":"https://api.github.com/users/RarCeth/events{/privacy}","received_events_url":"https://api.github.com/users/RarCeth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-14T23:19:47Z","updated_at":"2018-03-15T11:56:08Z","closed_at":null,"author_association":"NONE","body":"Creating Direct Line application for use with bot, started using https://github.com/tompaana/bot-direct-line-for-unity. I checked code, seems all good. \r\n\r\nBot initializes, conversation starts, all in the green. Then, when sending message, bot returns;\r\n\r\nBotResponse: [Event type: Error; Code: MissingProperty; Message: Invalid or missing activities in HTTP body]\r\nUnityEngine.Debug:Log(Object)\r\nGameManager:OnBotResponse(Object, BotResponseEventArgs) (at Assets/GameManager.cs:32)\r\n<SendMessageCoroutine>c__Iterator1:MoveNext() (at Assets/bot-direct-line-for-unity-master/bot-direct-line-for-unity-master/BotDirectLine/BotDirectLineManager.cs:160)\r\nUnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)\r\n\r\n\r\nThe coroutine used to  send message:\r\n```\r\npublic IEnumerator SendMessageCoroutine(string conversationId, string fromId, string message, string fromName = null)\r\n    {\r\n        if (string.IsNullOrEmpty(conversationId))\r\n        {\r\n            throw new ArgumentException(\"Conversation ID cannot be null or empty\");\r\n        }\r\n\r\n        if (IsInitialized)\r\n        {\r\n            Debug.Log(\"SendMessageCoroutine: \" + conversationId + \"; \" + message);\r\n\r\n            UnityWebRequest webRequest = CreateWebRequest(\r\n                WebRequestMethods.Post,\r\n                DirectLineConversationsApiUri\r\n                + \"/\" + conversationId\r\n                + \"/\" + DirectLineActivitiesApiUriPostfix,\r\n                new MessageActivity(fromId, message, DirectLineChannelId, null, fromName).ToJsonString());\r\n\t\t\t\r\n\r\n            yield return webRequest.Send();\r\n\r\n            if (webRequest.isNetworkError)\r\n            {\r\n                Debug.Log(\"Web request failed: \" + webRequest.error);\r\n            }\r\n            else\r\n            {\r\n                string responseAsString = webRequest.downloadHandler.text;\r\n\r\n                if (!string.IsNullOrEmpty(responseAsString))\r\n                {\r\n                    //Debug.Log(\"Received response:\\n\" + responseAsString);\r\n                    BotResponseEventArgs eventArgs = CreateBotResponseEventArgs(responseAsString);\r\n\r\n                    if (BotResponse != null)\r\n                    {\r\n                        BotResponse.Invoke(this, eventArgs);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    Debug.Log(\"Received an empty response\");\r\n                }\r\n            }\r\n        }\r\n        else\r\n        {\r\n            Debug.Log(\"Bot Direct Line manager is not initialized\");\r\n            yield return null;\r\n        }\r\n    }\r\n```\r\n## Expected Behaviour\r\nBot returns with response (In this case, a request for a yes or no answer). \r\n\r\n## Actual Results\r\nBot returns [400] error and fails. \r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/comments/373351702","html_url":"https://github.com/Microsoft/BotBuilder/issues/4317#issuecomment-373351702","issue_url":"https://api.github.com/repos/Microsoft/BotBuilder/issues/4317","id":373351702,"user":{"login":"RarCeth","id":15726265,"avatar_url":"https://avatars1.githubusercontent.com/u/15726265?v=4","gravatar_id":"","url":"https://api.github.com/users/RarCeth","html_url":"https://github.com/RarCeth","followers_url":"https://api.github.com/users/RarCeth/followers","following_url":"https://api.github.com/users/RarCeth/following{/other_user}","gists_url":"https://api.github.com/users/RarCeth/gists{/gist_id}","starred_url":"https://api.github.com/users/RarCeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RarCeth/subscriptions","organizations_url":"https://api.github.com/users/RarCeth/orgs","repos_url":"https://api.github.com/users/RarCeth/repos","events_url":"https://api.github.com/users/RarCeth/events{/privacy}","received_events_url":"https://api.github.com/users/RarCeth/received_events","type":"User","site_admin":false},"created_at":"2018-03-15T11:56:08Z","updated_at":"2018-03-15T11:56:08Z","author_association":"NONE","body":"Adding ```\r\nwebRequest.SetRequestHeader(\"Authorization\", \"Bearer \" + botSecret);\r\n```\r\nMakes the bot either come up with the same error, or \"missing token/secret\" depending on whether the space is there after \"Bearer\""}}
{"actor":{"display_login":"RarCeth"}}