Upload media

In addition to your text contents, Dialoguewise also allows you to add media files, like images and documents. To upload the media files, you need to create a payload of type UploadMediaRequest and set all the necessary parameters as below.

var request = new UploadMediaRequest();
request.AccessToken = '[Your Access Token]';

Then, you just need to set the LocalFilePath property which is the path to the file on your device.

request.LocalFilePath = '[Path to the file on your device]';

Then all you need to do is to call the UploadMedia method using this payload.

var dialogueWiseClient = new DialogueWiseClient();
var response = await dialogueWiseClient.UploadMedia(request);

That’s it! You will now get a response of type DialogueWiseResponse which will contain the URL to the uploaded file.

Below are the list of file types that are allowed.

Type Allowed file types
Images .gif, .jpeg, .jpg, .png, .svg
Documents .pdf, .txt, .doc, .docx
Videos .mp4, .mov

Please note, file of size more than 10 MB are not allowed.