Home / Zoho - Reports - API - Home / User Management API

User Management API

Tags:  

User Management API





Introduction


Manage User APIs are used to Add / Remove /  Activate / Deactivate  Users to your Zoho Reports Account. This APIs can be invoked only by the Administrator of the Zoho Reports account to add / activate / deactivate users to his account.

Note: These API's cannot be used to create user accounts in Zoho. This is just meant to associate an existing Zoho user to a Zoho Reports account held by an Administrator. 


Getting Started


To get started with the below documentation, make sure that you already gone through the Prerequisites and API Specifications documentations. 


Add Users API


Use this API to add users to your Zoho Reports Account (provided you are the Administrator). The users will be added in "Active State" by default and the active user count in your account will be increased accordingly. Incase your account already has exceeded the allowed user count limit, then the newly added users will be set as "Deactive". An invitation mail will be triggered to the newly added users.

Note: This API is used to just add users into your (Administrator's) Zoho Reports Account. This API does not create user accounts in Zoho.


Request

The sample request URL is below.

https://reportsapi.zoho.com/api/abc@zoho.com?ZOHO_ACTION=ADDUSER
&ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0


Query String Parameters  

The below table shows the list of query string parameters that has to be passed along with the request URL.

Parameter NameDescription
ZOHO_ACTIONThis parameter value should be ADDUSER.

Note:
This parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_EMAILSThis parameter holds the email addresses of the users to be added in your (Administrator's) Zoho Reports Account. The email addresses should be comma separated.

Ex: ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
authtoken
The authtoken parameter should hold the Auth Token of the Administrator Account. (Refer Generating AuthToken)


Response

The sample response sent from the server if the Add Users process is successful.

XML Format:

<response uri="/api/abc@zoho.com" action="ADDUSER">
<result>
<message>User(s) added successfully</message>
</result>
</response>


JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com",
"action": "ADDUSER",
"result":
{
"message": "User(s) added successfully"
}
}
}


Remove User API



The API to delete the users from the Administrator's Zoho Reports Account. On deleting the users, the number of users associated with the count will be decreased, if the Activate user(s) got removed. The usage details are below.

Request

The sample request URL is below.


https://reportsapi.zoho.com/api/abc@zoho.com?ZOHO_ACTION=REMOVEUSER
&ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0


Query String Parameters

The below table shows the list of Query String parameters that has to be passed along with the request URL.

Parameter NameDescription
ZOHO_ACTIONThis parameter value should be REMOVEUSER.

Note:
This parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_EMAILSThis parameter holds the email addresses of the users to be deleted from the Zoho Reports account. The email addresses should be comma separated.
Ex:- ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com

Please note that removing the users from Zoho Reports account doesn't remove the user from Zoho. It just removes the user from the Administrators Zoho Reports Account.
authtoken
The authtoken parameter should hold the Auth Token of the Administrator Account.


Response

The sample response sent from the server if the Remove Users process is success.

XML Format:

<response uri="/api/abc@zoho.com" action="REMOVEUSER">
<result>
<message>User(s) removed successfully</message>
</result>
</response>


JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com",
"action": "REMOVEUSER",
"result":
{
"message": "User(s) removed successfully"
}
}
}


Activate User API



This API is used to activate the users in the Administrator's Zoho Reports Account. The deactivated users will be activated using the Activate Users API. Once the user is activated, the user is counted when calculating the total users for the account. The API call will fail if the allowed user count limit is already reached and you cannot activate further new users.  The usage details are as below.

Request

The sample request URL is below.


https://reportsapi.zoho.com/api/abc@zoho.com?ZOHO_ACTION=ACTIVATEUSER
&ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0


Query String Parameters

The below table shows the list of Query String parameters that has to be passed along with the request URL.

Parameter NameDescription
ZOHO_ACTIONThis parameter value should be ACTIVATEUSER.

Note:
This parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_EMAILSThis parameter holds the email addresses of the users to be activated in Administrator's Zoho Reports Account. The email addresses should be comma separated.
Ex:- ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
authtoken
The authtoken parameter should hold the Auth Token of the Administrator Account.



Response

The sample response sent from the server if the Activate Users process is success.

XML Format:

<response uri="/api/abc@zoho.com" action="ACTIVATEUSER">
<result>
<message>User(s) activated successfully</message>
</result>
</response>


JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com",
"action": "ACTIVATEUSER",
"result":
{
"message": "User(s) activated successfully"
}
}
}


Deactivate User API



This API is used to de-activate the specified users from the Administrator's Zoho Reports Account. The activated users will be de-activated using the Deactivate Users API. Once the user is de-activated, the user count will be decreased if the user(s) was in Active State. The usage details are below.


Request

The sample request URL is below.


https://reportsapi.zoho.com/api/abc@zoho.com?ZOHO_ACTION=DEACTIVATEUSER
&ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
&ZOHO_OUTPUT_FORMAT=XML&ZOHO_ERROR_FORMAT=XML
&authtoken=g38sl4j4856guvncrywox8251sssds&ZOHO_API_VERSION=1.0


Query String Parameters

The below table shows the list of Query String parameters that has to be passed along with the request URL.

Parameter NameDescription
ZOHO_ACTIONThis parameter value should be DEACTIVATEUSER.

Note:
This parameter should be in the same case(UPPER CASE) as given in this document.
ZOHO_EMAILSThis parameter holds the email addresses of the users to be deactivated from the Zoho Reports account. The email addresses should be comma separated.

Ex:- ZOHO_EMAILS=user1@yourdomain.com,user2@yourdomain.com
authtoken
The authtoken parameter should hold the Auth Token of the Administrator Account.


Response

The sample response sent from the server if the De-activate API call is successful. 

XML Format:

<response uri="/api/abc@zoho.com" action="DEACTIVATEUSER">
<result>
<message>User(s) de-activated successfully</message>
</result>
</response>


JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com",
"action": "DEACTIVATEUSER",
"result":
{
"message": "User(s) de-activated successfully"
}
}
}



Error Handling



This section explains about the possible error responses that could be returned by Zoho Reports on failure of the Manage User API calls discussed above. The sample error response is below.

XML Format:

<response uri="/api/abc@zoho.com" action="ADDUSER">
<error> <code>6021</code>
<message>Sorry, you cannot activate additional user(s). Your plan limit allows you to have only 2 shared users. Kindly ;Upgrade' your plan to activate more users.</message>
</error>
</response>


JSON Format:

{
"response":
{
"uri": "\/api\/abc@zoho.com",
"action": "ADDUSER",
"error":
{ "code":6021,
"message": "Sorry, you cannot activate additional user(s). Your plan limit allows you to have only 2 shared users. Kindly ;Upgrade' your plan to activate more users."
}
}
}

Error Codes:

The below table shows the list of common errors with error codes sent from server on failure of the above discussed API's.

ZOHO_ACTION
Error CodeReasonSolution
ADDUSER / REMOVEUSER / ACTIVATEUSER / DEACTIVATEUSER
8509
The Email Ids provided in ZOHO_EMAILS parameter is not proper / not in the EMAIL ID format
Check the email addresses passed in the parameter and provide the proper email address
ACTIVATEUSER
6021
Activating Users not allowed since the users count exceeds the allowed limit for your Zoho Reports Plan
You can upgrade your Zoho Reports Account or you can get additional users as add-ons. You can manage your plan by clicking the "Subscription" link at top after you log into Zoho Reports. 

For more details on Zoho Reports pricing visit:


In case you encounter any other errors, please mail the API request URL parameters and error response details to support@zohoreports.com. We will get back to you shortly with the best possible solution.





    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