botframework - Send message from Postman to Microsoft Bot -


i trying send message bot created , published azure services bot can start messaging of users.

i trying make requests on postman first can build controller interaction.

i doing following request:

post https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token content-type: application/x-www-form-urlencoded body: grant_type:client_credentials client_id: my_ms_app_id client_secret: my_ms_app_secret scope: https://api.botframework.com/.default 

from in response bearer authorization:

{   "token_type": "bearer",   "expires_in": 3599,   "ext_expires_in": 0,   "access_token": "eyj0exa..." } 

then proceed following request:

post https://skype.botframework.com/v3/conversations content-type: application/json authorization: bearer eyj0exai....  {     "bot": {         "id": "i don't have id pass string",         "name": "connector controller"     },     "isgroup": false,     "members": [         {             "id": "28:...", //id of bot want send message             "name": "sp bot"//name of bot want talk         },        {             "id": "i don't have id pass string",             "name": "connector controller"         }     ],     "topicname": "news alert" } 

in response conversation id matches "id": "i don't have id pass string": { "id": "i don't have id pass string" }

then proceed following post request:

post. https://skype.botframework.com/v3/conversations/i don't have id pass string/activities authorization: bearer eyj0... content-type:application/json 

i following response:

400 bad request  {   "error": {     "code": "serviceerror",     "message": "the conversationid 29... , bot .... doesn't match known conversation"   } } 

it looks problem occurs between second , 3 post method. looks https://skype.botframework.com/v3/conversations not generate conversation bot id entered.

so when make final call bot: https://skype.botframework.com/v3/conversations/.../activities serviceerror message.

based on comments trying create custom "channel/client" talk bot.

for doing that, recommend taking direct line seems way go achieving requirement.

i'm not sure language using, send pointers both c# , node.

these samples show how create custom client using direct line interact bot:

c#

node.js

all samples using console app "custom channel".


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -