Get Started with the API Key (Gateway)
Using the Gateway (Secrets Proxy) allows the use of traditional API Keys.
Most centralized API services facilitate programatic authentication using API Keys, a paradigm familiar with any developer. The Space and Time Gateway (Secrets Proxy) can manage your API Keys and translate that into access to the Space and Time decentralized network.
API keys are managed by the Gateway (Secrets Proxy). This allows users a simplified experience in running SQL, however some requests are only available by connecting directly to the decentralized network, using Access Tokens.
Create an API Key with Space and Time Studio
The easiest way to request an API Key is on the Space and Time Studio.
- Navigate to Studio and login with your existing UserID and Password, or create a new user if needed.
- Click on "My Account" in the upper-right (replaces "Sign in") to pop out the account control.
- Click on the "Permissions & Biscuits" tab,
- The very top section is "Create API Key", which has two modes:
- "Show API Keys" will display existing key prefixes, notes, and allow you to delete keys
- "Create API Key" allows you to provide a note (for hint on usage) and "Add" the key
Once you "Add" a new key, the interface will display that key ONLY ONCE. A Space and Time API key will look something like this: sxt_dMFtbHgkW5_59sND2XMSXuEeOtXzNalSKbvZ
. You can have up to 5 keys at a time.
Be sure to copy your API key immediately and keep it secure. For security reasons, you can only retrieve the key once upon creation. The Studio will never show you this key again.
If you fail to copy or lose the key, you will need to delete that key and create another.
Once you have your API key, you can start issuing SQL requests using the Proxy SQL Execute API.
Create an API Key with API Calls
Like any action in Space and Time Studio, it is also possible to create an API Key using API calls direct. If you're interested, you can create a new API key with two calls:
- Login to the Gateway (Secrets Proxy) using the Login API and collect the returned "sessionId".
- Create the API Key by supplying a description and sessionId to the Create API Key API.
Done! The second API call will return a new API Key.
Updated about 1 year ago