Developer API

Getting Null response with error code
Here is the error I'm getting: {"responseStatus":{"errorCode":"ValidationException","message":"Validation failed: \n -- UserName: 'User Name' must not be empty.\n -- Password: 'Password' must not be empty.","errors":[{"errorCode":"NotEmpty","fieldName":"UserName","message":"'User Name' must not be empty.","meta":{"PropertyName":"User Name"}},{"errorCode":"NotEmpty","fieldName":"Password","message":"'Password' must not be empty.","meta":{"PropertyName":"Password"}}]}} null Here's my zoho deluge script: apiURL = " https://sandbox.api.portal.io/authenticate/apikeyexchange "; UserName = "EMAIL"; Password = "PASSWORD"; apiAppId = "APPID"; secretKey = "SECRETKEY"; // Ensure this line ends with a semicolon // Get current date-time in GMT format currentDateTime = zoho.currentdate.toString("EEE, dd MMM yyyy HH:mm:ss 'GMT'"); // Create signature string signatureString = "GET" + apiURL + currentDateTime; // Generate HMAC SHA256 hash and convert to Base64 hashedSignature = zoho.encryption.hmacSHA256(signatureString,secretKey); info "hashedSignature: " + hashedSignature; encodedSignature = zoho.encryption.base64Encode(hashedSignature); info "encodedSignature: " + encodedSignature; // Create headers headers = Map(); headers.put("X-MSS-API-APPID",apiAppId); headers.put("X-MSS-CUSTOM-DATE",currentDateTime); headers.put("X-MSS-SIGNATURE",encodedSignature); // Optional: Add Basic Auth header data = UserName + ":" + Password; info "data: " + data; basicAuth = zoho.encryption.base64Encode(data); headers.put("Authorization","Basic " + basicAuth); info headers; // Make the API request response = invokeurl [ url :apiURL type :GET headers:headers.toMap() connection:"portalapi" ]; info "response: " + response; // Parse the response to get the User Key userKey = response.get("userKey"); info userKey; // For debugging I have been told by Zoho that the script is written correctly and its just the API that isn't responding with a user key. Can someone help me understand what I did wrong?
0