Problem with CRM API call
Hi guys.
I have a problem with a CRM API call for fetching the list of Accounts from Zoho Creator.
Let's say I paste this in the browser:
https://crm.zoho.com/crm/private/xml/Accounts/getRecords?apikey={MY_API_KEY}&ticket={MI_TICKET}&fromIndex=1&toIndex=200&sortColumnString=Account Name&sortOrderString=asc
It returns an XML that contains the whole list of a Accounts.
However, if I execute this code from the Zoho Creator:
- // Generating the ticket
- ticketStr = rfm.crm.getCrmTicket();
- // Getting the API Key
- apiKeyStr = rfm.crm.getCrmApiKey();
- // Getting the data
- xmlString = getUrl("http://crm.zoho.com/crm/private/xml/Accounts/getRecords?apikey=" + apiKeyStr + "&ticket=" + ticketStr + "&fromIndex=1&toIndex=200&sortColumnString=Account Name&sortOrderString=asc");
- alert ">>> xmlString: " + xmlString;
the alert displays: "internal exception" or "The server encountered an unexpected condition which prevented it from fulfilling the request.".
I'm totally sure the ticket and the API key are being got properly. As I said, I don't understand the reason why it works if I paste the code in my browser, but it does not work from Zoho Creator.
Please let me know your thoughts. If it is necessary to enabling the edition for Support, I'll do it.
Thanks.
- Alejandro