Knowledgebase
Knowledgebase
Query account details for local storage
Posted by Chris Duerr on 08 January 2012 09:12 PM

The account query script provides basic AddonChat account settings to facilitate tigter integration with 3rd party products.

To make integration with your product easy for AddonChat customers, we recommend that you only request their account number and customer password; and perform the lookup of the server name and additional parameters using the queryaccount.php script specified below:

Script Location:

http://clientx.addonchat.com/queryaccount.php

Parameters:

id: Numeric portion of AddonChat account number.
md5pw: MD5 Hashed Password.

Output:

On success, the following 13 lines (separated by a carriage return and linefeed '\r\n') will be returned. On failure, only four lines will be returned, the first line being a -1 error code.
  1. INTEGER: Numeric Edition Code, or -1 for failure. At the time of this writing the following edition codes exist: 0: Free; 10: Personal; 20: Professional; 30: Professional PLUS; 40-130: Enterprise Editions.
  2. Numeric list of modules installed; which each number indicating a specific module. The list is enclosed in parenthesis, and numeric codes for modules are not presently documented. If line 1 is an error (-1) this line will merely be 0.
  3. BOOLEAN: 0, or 1; specifying whether or not this chat room is capable of enabling the Remote Authentication System. If line 1 is an error, this line will contain a description of the error.
  4. Full Service Edition Name (e.g., Enterprise-200), or 0 (zero) on error.
  5. Account Expiration Date.
  6. BOOLEAN: 0, or 1; specifying whether or not remote authentication is currently enabled for this account
  7. Current Remote Authentication URL (fully qualified if valid)
  8. Assigned server name (e.g., client8.addonchat.com)
  9. Assigned TCP connection port
  10. Direct, fully qualified URL to control panel login
  11. Title of chat room as specified by customer
  12. Account ID, preceded with 'SC-' product code.
  13. Customer ID, preceded with 'RC-' customer code.

Example:

http://clientx.addonchat.com/queryaccount.php?id=12345&md5pw=293890908237789sdfhsd8923

Example Output:

30
(3,5,7,14,23)
1
Professional PLUS
2011-08-23
0
http://
client23.addonchat.com
8009
http://cpanel23.addonchat.com/this?is=just+to+give&you=an+example
My Very Own Chat Room
SC-9384949
RC-0010293948

Example Error Output:

-1
0
Incorrect Password
0

Notes:

You can safely assume that a chat room's assigned server will not change; thus only lookup should be neccesary to determine a chat room's assigned server based on it's account ID number. 

This script guarantees the Content-type output will be in plain text format, UTF-8 encoded.
(16 vote(s))
This article was helpful
This article was not helpful

Comments (0)