I've written an Azure function to send data into the Zoho CRM SDK. The SDK needs a file path to write some meta data while its in use (called "resourcePath"). While developing on my local I was using My Documents and it works fine. I need to find a location I can use in the Azure environment.
Based on articles I've read, I've tried System.IO.Path.GetTempPath() and context.FunctionAppDirectory'. Both of which throw a permissions error. The error is from the SDK {{ "code": "OAUTH_SCOPE_MISMATCH", "status": "error", "message": "invalid oauth scope to access this URL" }}
I'm told that this is a permissions error on the file location. What location I should be using for an Azure Function?
**Reply to @HariKrishnaRajoli-MT **
I made the path change and now I get Object reference not set to an instance of an object. in CreateRecords(). The RecordOperations, moduleApiName and bodyWrapper are all valid. Nothing is null.
at Com.Zoho.Crm.API.Util.Utility.GetFieldsInfo(String moduleAPIName) at Com.Zoho.Crm.API.Util.Utility.GetFields(String moduleAPIName) at Com.Zoho.Crm.API.Record.RecordOperations.CreateRecords(String moduleAPIName, BodyWrapper request) at Zoho_CRM_Feed.feed_app.Lead.CreateNewLead(List1 leads) in C:\Users\xxxxxxxx\source\repos\Zoho_CRM_Feed\Zoho_CRM_Feed\feed_app\Lead.cs:line 75
Any suggestions?