【发布时间】:2021-11-14 11:50:27
【问题描述】:
我编写了一个 Azure 函数来将数据发送到 Zoho CRM SDK。 SDK 在使用时需要一个文件路径来写入一些元数据(称为“resourcePath”)。在我的本地开发时,我使用的是我的文档,它工作正常。我需要找到一个可以在 Azure 环境中使用的位置。
根据我读过的文章,我尝试了System.IO.Path.GetTempPath() 和context.FunctionAppDirectory'. 两者都抛出了权限错误。错误来自 SDK {{ "code": "OAUTH_SCOPE_MISMATCH", "status": "error", "message": "invalid oauth scope to access this URL" }}
我被告知这是文件位置的权限错误。我应该为 Azure 函数使用什么位置?
**回复@HariKrishnaRajoli-MT **
我更改了路径,现在我在CreateRecords() 中获得了Object reference not set to an instance of an object.。 RecordOperations、moduleApiName 和 bodyWrapper 都是有效的。没有什么是空的。
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
有什么建议吗?
【问题讨论】:
标签: c# sdk azure-functions zoho