Authentication
WindBorne uses API keys to authenticate API requests. If an API request is not properly authenticated, it will fail. You can sign up for a free trial to get started, or contact data@windbornesystems.com for full commercial access.
You should have a WB_API_KEY . You should make sure to keep your API key safe and secure.
To authenticate, pass a Bearer token in the Authorization header of your request using your WB_API_KEY .
Legacy Basic Auth
The previous Basic Auth format using WB_CLIENT_ID and WB_API_KEY (e.g.,
-u 'WB_CLIENT_ID:WB_API_KEY') will continue to work. However, Bearer token authentication is now the recommended approach and only requires a single WB_API_KEY .
Bearer Token Authentication
Bearer Token Authentication Examples
# Make a GET request to WindBorne, authorizing with WindBorne correctly# Make a GET request to WindBorne, authorizing with WindBorne correctly
curl 'URL' -H "Authorization: Bearer $WB_API_KEY"curl 'URL' -H "Authorization: Bearer $WB_API_KEY"
Authentication Endpoint
To verify your credentials quickly, request /debug/v1/auth_status . On success it returns:
{{
"authed": true, "authed": true,
"client_id": "CLIENT_ID" "client_id": "CLIENT_ID"
}}
CLI and Installation
WindBorne releases a pip installable library built to interact with Data and Forecasts APIs that comes with a Command Line Interface (CLI) out of the box.
Install WindBorne
pip3 install windbornepip3 install windborne
Set credentials on mac and linux
Setup Environment Variables
# Determine your shell and it's configuration file# Determine your shell and it's configuration file
# Some common configuration files are: ~/.bashrc, ~/.bash_profile, ~/.zshrc# Some common configuration files are: ~/.bashrc, ~/.bash_profile, ~/.zshrc
echo $SHELLecho $SHELL
# Edit your shell configuration file adding this line# Edit your shell configuration file adding this line
export WB_API_KEY='your_api_key'export WB_API_KEY='your_api_key'
# Reload the shell configuration to apply changes immediately or restart# Reload the shell configuration to apply changes immediately or restart
Set credentials on Windows
- Press Win + X and select "System"
- Click "Advanced system settings" on the right
- Click "Environment Variables" at the bottom
- Under "User variables", click "New" and add the following:
| Variable Name | Variable Value |
|---|---|
| WB_API_KEY | your_api_key |