Internal GCManage API
Jump to navigation
Jump to search
Authentication With GCManage 2.0
Before calling any of the GCAPI services, an application must authenticate and obtain a "passcode" from GCManage. GCManage provides a service to fetch the accounts available to a user and their "passcodes" given the user's name and password. This service is useful when implementing an third-party login page for GCManage or when calling services on GCAPI. The format for calling this function is:
https://[GCManage-URL]/services.php?sname=LoginService&username=[username]&password=[plain-text-password]&listaccounts=true
The result of the call will be be a JSON encoded string that includes a list of accounts that this user can access:
{ "result": "OK", "id": "c07c11ee-3a27-47e5-9c81-7857de364cdc", "lastLogin": "never", "accounts": [ { "accountName": "...", "systemId": "...", "passcode": "...", "url": "..." }, ... ] }
- result: OK if the call succeeded, ERROR otherwise
- errorMessage: Only appears if result is ERROR. Explanation of why call failed
- id: User's unique ID
- lastLogin: User's last login date/time
- accounts: Array of accounts this user has access to
- accountName: Long name for the account
- systemId: ID of associated hardware for the account
- passcode: Effectively the "password" for the system. The passcode changes daily in the very early morning, so it needs to be fetched again every day
- url: Base URL used to communicate with the system
Legacy Authentication With GCManage 1.5
Authentication was a little different in GCManage 1.5.x:
https://[GCManage-URL]/services.php?sname=remotelogin&username=[username]&rawpassword=[plain-text-password]
The result of the call will be be a list of accounts, one per line, that this user can access. Each line is of the format:
[como-system-url]@@[passcode]@@[starting-point]@@[account-description]
- como System URL: The URL to use to get to the system, either proxied or direct, based on the caller's location and other various elements on the server
- passcode: Effectively the "password" for the system. The passcode changes daily in the very early morning, so it needs to be fetched again every day
- Starting Point: The initial menu screen the user sees when connecting to the system. Either "main" for the Main Menu or "tv" for the TV Operations Page
- Account Description: An identifier giving various information about the account