I'm working on integrating Zoho Writer into my web app using Zoho Office Integrator. My web app uses an WebAPI api in c#, .net framework 4.8 and the zoi-csharp-sdk. I am able to open a file from local storage by following the Zoho docs and code examples. The code that opens the doc includes a bit that sets the Save parameters as follows:
using Com.Zoho.Util;
using Com.Zoho.Officeintegrator.V1;
using Com.Zoho;
using Com.Zoho.Dc;
using Com.Zoho.API.Authenticator;
using Com.Zoho.API.Logger;
using static Com.Zoho.API.Logger.Logger;
...
Dictionary<string, object> saveUrlParams = new Dictionary<string, object>();
saveUrlParams.Add("templateId", templateId);
saveUrlParams.Add("filePath", networkPath);
Dictionary<string, object> saveUrlHeaders = new Dictionary<string, object>();
saveUrlHeaders.Add("Authorization", _context.Token);
CallbackSettings callbackSettings = new CallbackSettings();
callbackSettings.Retries = 2;
callbackSettings.Timeout = 10000;
callbackSettings.SaveFormat = "docx";
callbackSettings.HttpMethodType = "post";
callbackSettings.SaveUrlParams = saveUrlParams;
callbackSettings.SaveUrlHeaders = saveUrlHeaders;
if (APIBaseURL.IndexOf("localhost") > -1) APIBaseURL = "https://my url";
callbackSettings.SaveUrl = APIBaseURL + "api/files/save-zoho-doc";
createDocumentParams.CallbackSettings = callbackSettings;
I have checked that APIBaseURL is accessible from the internet. When I click the Save option in the Writer editor nothing happens. No errors and no logs. The breakpoint in the api call save-zoho-doc is never hit. Here is an excerpt from the api
[HttpPost]
[Route("save-zoho-doc")]
[SwaggerResponse(HttpStatusCode.OK, typeof(string))]
public IHttpActionResult SaveZohoDoc([FromUri] int templateId, string filePath) {
System.Web.HttpRequest httpRequest = System.Web.HttpContext.Current.Request;
if (httpRequest.Files.Count > 0 && !string.IsNullOrEmpty(filePath)) {
...