UnAuthenticated Connection
What is wrong with the code, the code is taken from the standard zoho functions who should create a project in Zoho Project based on a closed Deal. I created the connection in the settings. it throws this error: Error due to - 'UnAuthenticated Connection: in2'at lineNumber -1"
I'm posting the code below. I'd really appreciate any help. I'm at the beginning level of programming in Deluge
Please don't suggest using another code method, the problem is with connecting via invokeurl but I can't understand what exactly.
=====================
void automation.Create_Projects_for_Closed_Potentials1(String ProjName,String PortalName,String TemplateID,String Description,Date startdate,Date enddate)
{
createMap = Map();
createMap.put("name",ProjName);
// Provide name of the project to be created
createMap.put("description",Description);
createMap.put("start_date",startdate.toString("MM-dd-yyyy"));
createMap.put("end_date",enddate.toString("MM-dd-yyyy"));
createMap.put("template_id",TemplateID);
// Notes :
//Please uncomment the below lines in the code and change the connection api name. after creation of connection.
response = zoho.projects.createProject(PortalName,createMap,"in2");
info response;
projectid = response.get("projects");
for each rec in projectid
{
projid = rec.get("id");
projname = rec.get("name");
}
mp = Map();
mp.put("name",ProjName);
mp.put("status","active");
mp.put("start_date",startdate.toString("MM-dd-yyyy"));
mp.put("end_date",enddate.toString("MM-dd-yyyy"));
updateprojects = invokeurl
[
url :"https://projectsapi.zoho.com.eu/restapi/portal/" + PortalName + "/projects/" + projid + "/"
type :POST
parameters:mp
connection:"in2"
];
info updateprojects;
// Please replace 'xxxxxxxxx' with the project connection api name with scopes ( ZohoProjects.projects.ALL, ZohoProjects.projects.CREATE )
}