I am trying to create a bot using Microsoft BotFramework
The issue I am facing is when the bot code is trying to download data(image which is uploaded by user to the bot) via any channel like Facebook messenger/Skype/Slack. The code to download is by creating a WebClient and making a DownloadData call by passing the attachment URL.
I am able to browse the uploaded image URL. Also, the code for download data via web client works fine if I write a console application rather than a Bot application.
c# Code snippet:
WebClient wc = new WebClient();
byte[] bytes = wc.DownloadData(imageUrl); // This line gives 403 error
Kindly suggest what should be the solution for this issue.
403 should only appears for Skype. #662 have sample implementation how to fix this issue.
Thanks a lot msft-shahins, #662 sample has solved the issue. Your help is much appreciated.
Most helpful comment
403 should only appears for Skype. #662 have sample implementation how to fix this issue.