Closed RamPrasadMeenavalli closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@RamPrasadMeenavalli Did you ever sort this out?
I am not able to reproduce this issue.
@benbrown - No. I haven't checked this after I reported the issue. I will check it again if I still face the issue. Thank you.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@benbrown Hi Ben, I recently was working on an integration of MS Bot with WebEx Teams and faced this issue.
Below is the code i'm using to initiate the listening of webex adapter with MS bot using NodeJS.
const adapter = new WebexAdapter({ access_token: process.env.ACCESS_TOKEN, public_address: process.env.PUBLIC_ADDRESS, secret: process.env.SECRET });
const server = restify.createServer(); server.use(restify.plugins.bodyParser()); adapter.registerWebhookSubscription('/api/messages'); adapter.registerAdaptiveCardWebhookSubscription('/api/messages'); adapter.getIdentity();
server.post('/api/messages', (req, res) => {
adapter.processActivity(req, res, async (turnContext) => {
await turnContext.sendActivity('Hello User!');
});
});
After I post a message to the bot in webex teams, the webhook which i have created before,is getting called and the bot receives the user's message from webex teams.
the line in the above code - await turnContext.sendActivity('Hello User!'); is faling with the below error mesage.
[onTurnError] unhandled error: BadRequest: Both text and file cannot be empty. POST https://hydra-a.wbx2.com/v1/messages WEBEX_TRACKING_ID: webex-js-sdk_76d085fe-df79-4101-833c-3e53f4ec14ab_12
Im using NodeJS version - v12.14.1 My package.json dependencies are
"botbuilder": "~4.6.1", "botbuilder-adapter-webex": "1.0.7", "restify": "~8.4.0"
Request you to help me resolve this.
I am using the WebexAdapter from botbuilder-adapter-webex to connect my BotBuilder bot with Webex teams.
I have used the following code
When I post a message to the bot (in Webex Teams) the webhook gets called and the bot receives the user's message. At the step 'await context.sendActivity('Hey human!!');' it fails with the below error message
BadRequest: Unable to retrieve content. POST https://api.ciscospark.com/v1/messages WEBEX_TRACKING_ID: spark-js-sdk_9ba910cb-43ea-4800-88be-dde33e7ba825_7
I am using the following packages "botbuilder": "~4.5.1", "botbuilder-adapter-webex": "^1.0.2", "restify": "~8.3.3" Node version : v10.15.3