Prerequisites

Tags:  

Prerequisites for using the API

1. It is mandatory to use HTTPS in all API requests instead of HTTP request. HTTP is not supported

2. Always use https://reportsapi.zoho.com as the API request URL.

The following are the prerequisites to use Zoho Reports API.

Zoho Reports User Account

Users should have a valid Zoho login email address to use the API. If you do not have one, please Sign up into Zoho Reports and create a login.

Auth Token

Authentication Token, here after referred as Auth Token, is a unique token that authenticates the user to access the Zoho Account. This is a user-specific and permanent token, that need to be passed along with every Zoho Reports API request.

Generating Auth Token

Users can generate a Auth Token using one of the following mode. You can generate it just once and use it for all your API calls.

Browser Mode

To generate Auth Token from your Browser, follow the steps given below.

  1. Login to your Zoho Reports account.
  2. Now open a new tab in the same browser and then access the url below.
   https://accounts.zoho.com/apiauthtoken/create?SCOPE=ZohoReports/reportsapi

Sample Response:

The following is a sample response for a Auth Token request.

#
#Wed Jun 29 03:07:33 PST 2013
AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
RESULT=TRUE

Response Details:

  • #COMMENT
Auth Token generated date.
  • AUTHTOKEN

The permanent Auth Token (Alpha numeric value) generated for Zoho Reports API access.

  • RESULT

Value is TRUE if the Auth Token is generated successfully.

 

API Mode

To generate Auth Token using API mode, send an HTTPS POST request to Zoho Accounts using the following URL format.

URL Format:

https://accounts.zoho.com/apiauthtoken/nb/create?SCOPE=ZohoReports/reportsapi

Mandatory POST Parameters to be passed along with this URL are:

Parameter Description
EMAIL_ID
Specify your Zoho Login Email Address
PASSWORD
Specify your Zoho Reports Password
(Note: You have to provide Application Specific Password if you are using Two Factor Authentication. Read the Note below to know how to generate this)

Note for users using Two Factor Authentication:

If you have enabled Two Factor Authentication(TFA) for your Zoho Account, then you need to specify the Application Specific Password, instead of your Zoho Reports account password, to generate the Auth Token.

The following are the steps to generate an Application Specific Password for your Zoho Account.

  1. Login into Zoho Account
  2. Click Two Factor Authentication. The Two Factor Authentication section in the Settings page will open.
  3. Click Manage Application Specific Passwords button.
  4. Specify a descriptive name in Device (or) App Name field. For example Zoho Reports API. The Device (or) App Name is only for your reference.
  5. Specify your Zoho Reports Account Password.
  6. Click Generate. The Application Specific Password will be generated.

Use this Application Specific Password to generate the Auth Token for your account. Learn more about the Application Specific Passwords from here.

Sample Response:

The following is a sample response for a Auth Token request.

#
#Wed Jun 29 03:07:33 PST 2013
AUTHTOKEN=bad18eba1ff45jk7858b8ae88a77fa30
RESULT=TRUE

Response Details:

  • #COMMENT
Auth Token generated date.
  • AUTHTOKEN

The permanent Auth Token (Alpha numeric value) generated for Zoho Reports API access.

  • RESULT

Value is TRUE if the Auth Token is generated successfully.


Managing Auth Tokens

You can access and manage all the active secret Auth Tokens of your Zoho account from the Zoho Account page.

To access the active Auth Tokens:

  • Login to Zoho Reports.
  • Click the drop-down menu displayed with your user name at the top right corner.
  • Click Account Settings menu item, this will open Zoho Accounts Profile page (You can also directly access/open this page using direct link https://accounts.zoho.com).
  • Navigate to the Settings tab and then click Active Authtokens. The Active Authtoken page will list all the active secret Auth Token of your account.
  • If required, you can remove or regenerate the Auth Token using the Remove and Re-Generate button respectively.


Important Note

  • The Auth Token is a service-specific token and cannot be interchanged among Zoho services
    (For example the Auth Token generated for Zoho Reports cannot be used in another service like Zoho CRM and vice versa). 
  • Generate a single Auth Token and use it across all API calls in Zoho Reports.
  • In case the user has removed or regenerated the Auth Token, then the existing token will become invalid and cannot be used in API request.
  • In case the user is deactivated, then all the Auth Token's of the user's account will become invalid.
  • Google Apps User can log into your Zoho Reports account and then use the browser mode to generate the Auth Token.

Reporting Database

To use the Zoho Reports API, users should have already created a reporting database with required tables and reports in Zoho Reports service using the browser based Web interface provided. You cannot use the API, if there are no Reporting Databases available in your Zoho Reports account. To know how to create a database, click here.


    Post a comment

    Your Name or E-mail ID (mandatory)

    Note: Your comment will be published after approval of the owner.




     RSS of this page