Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
API Keys & Sessions
API Keys and Sessions form an integral part of ECGridOS. They are essential to authentication and security. Understanding them is key to creating robust, efficient ECGridOS applications.
The API Key or SessionID is a Globally Unique Identifier (GUID) presented in string format:
The API Key is the preferred way to authenticate to ECGridOS. Using an API Key allows you to make API calls without using Login() and Logout(). Each user is assigned a unique API Key at sign up that acts as a persistent Session ID, essentially pre-authenticating the user. In ECGridOS you can substitute your API Key for the the Session ID anywhere in the API.
GenerateAPIKey() is used to create a new API Key for a user.
A typical session will last only a few seconds. Applications should only be logged into a session long enough to perform a specific task.
Many ECGridOS functions have a standard and Ex format (e.g. ParcelInBox and ParcelInBoxEx). The standard version always applies the NetworkID and MailboxID belonging to the user of the current SessionID or APIKey. The Ex variant allows the NetworkID and MailboxID to be specified – and requires that the user have authorization to the specified NetworkID and MailboxID for that specific API call. Attempting to access a NetworkID or MailboxID without sufficient authorization will result in an Access Denied error.