Read about the CRM Authentication Token in our Developer API Forum .
If you are an existing Developer API user and you are using the API Ticket and API Key in all your API calls, it is recommended that you replace the URLs with the CRM Authentication Token. Click here to learn about the Authentication Token.
Note:
The Auth Token is permanent and unlike the API Ticket, you DO NOT have to generate a new token every 7 days.
The format for generating the Authentication Token is:
https://accounts.zoho.com/apiauthtoken/nb/create?SCOPE=ZohoCRM/crmapi&EMAIL_ID=Zoho CRM Username or Email ID&PASSWORD=Your Zoho CRM Password
So, the API call to fetch all leads from the Leads module will be:
https://crm.zoho.com/crm/private/xml/Leads/getCVRecords?newFormat=1&authtoken=7d987676893g4j09h43dd0b167dda34b&scope=crmapi&cvName=All Open Leads
Zoho CRM Edition | API Requests - Upper Limit |
Free Edition (3 users free) |
Total 250 Requests / day / organization |
Professional Edition (USD 12 / user /month) |
250 Requests /day /user license;OR 5,000;Requests/day /organization, whichever is lower |
Enterprise Edition (USD 25 / user /month) |
250 Requests/day /user license OR |
For instance, in the Free Edition, if you use the;getRecords;method, you can fetch a maximum of 200 records per request, in turn, a total of 50,000 records per day (250 x 200 = 50,000 records).
Important:; If you use the;getSearchRecords;or;getCVRecords;methods, you can send a maximum of;250 Requests per day;irrespective of your Zoho CRM edition.;
While initiating API request, you must pass the ticket parameter (encrypted alphanumeric string) to authenticate the user credentials with Zoho. To generate a ticket for a particular user, you need to send an authenticated HTTPS POST request over a secured connection to Zoho Accounts.
Sample form POST format with supported parameters:
<form method=" POST " action=" https://accounts.zoho.com/login" target="_self">
<input type="hidden" name=" LOGIN_ID " value="[ZOHO Username or Email ID]">
<input type="hidden" name=" PASSWORD " value="[Password for ZOHO ID]">
<input type="hidden" name=" FROM_AGENT " value="true">
<input type="hidden" name=" servicename " value="ZohoCRM">
<input type="submit" value="Generate Ticket" class="divbutton" name="submit">
</form>
The mandatory parameters along with their values to be passed in the URL are:
Parameter | Type | Description |
servicename | ZohoCRM | Specify the service name is ZohoCRM |
FROM_AGENT | Boolean | True |
LOGIN_ID | String | User's Zoho ID or Email Address |
PASSWORD | String | Password for the Zoho ID |
Depending on the parameters passed over to the requested URL,;you will get a response in the format given below:
Parameter | Type | Description |
Comment | String | Ticket generated date & time |
GETUSERNAME | ||
WARNING | String | If the parameters passed in the URL are incorrect, the user will get a warning message stating the same otherwise the value will be null. |
PASS_EXPIRY | Integer | Displays duration of the password expiry. You will get the value as -1, if the password expiry is not set for your Zoho account. |
TICKET | String | Ticket generated for the request (32 characters) |
RESULT | Boolean | Value is TRUE if the ticket is generated successfully, else it is FALSE. |
Example 1: Successful Ticket Generation Pattern
# #Thu Apr 01 20:29:06 PDT 2010
GETUSERNAME=null
WARNING=null
PASS_EXPIRY=-1
TICKET=5767ef44382712202e432d57da576b34
RESULT=TRUE
Example 2: Failure Ticket Generation Pattern
# #Thu Apr 01 20:34:34 PDT 2010
CAUSE=Username and Password do not match
RESULT=FALSE
Note:
If you have more than 20 active sessions, you will get a response like this:
CAUSE=Maximum Concurrent User Tickets Limit ExceededRESULT=FALSE
You can follow any of the following measures to avoid crossing the concurrent API sessions limit.
Reuse the API ticket: An API ticket once generated can be used for a period of 7 days. You have to generate a new ticket only after 7 days.
Logout:Clear/Logout the ticket after you have completed the operation.
An HTTPS POST request to clear/logout api ticket will look like this:
<form method="POST" action="https://accounts.zoho.com/logout" target="_self">
<input type="hidden" name="ticket" value="<ticket_value>">
<input type="hidden" name="FROM_AGENT" value="true">
</form>
Close Sessions: Go to https://accounts.zoho.com/ Click Active Sessions > Click Close all other sessions.
Here's a sample program to regenerate the API ticket after it becomes invalid.