Authentication
Connecting to the Jingongo API requires a secure, permanent API Key. This guide will walk you through the simple, one-time process of generating this key.
Step 1: Get a Temporary User Token
First, you need a short-lived token from the Jingongo web portal.
- Sign up or log in to the Jingongo web portal at www.jingongo.com (opens in a new tab).
- After logging in, navigate to your user dashboard or profile page.
- Find and copy your temporary User Token. This token is typically valid for about one hour.
Step 2: Generate Your Permanent API Key
With your temporary token, you can now use the SDK's helper script to generate a permanent API key.
-
Set the User Token as an Environment Variable. In your terminal, run the appropriate command for your system, pasting your token where indicated.
# On Windows CMD set TEMPORARY_USER_TOKEN="your_copied_user_token_here"
# On macOS, Linux, or PowerShell export TEMPORARY_USER_TOKEN="your_copied_user_token_here"
-
Run the Generation Script. If you have cloned the SDK's repository, navigate to the
examples
folder and run:python 01_generate_api_key.py
The script will contact the Jingongo API and exchange your temporary token for a new, permanent API Key. Save this key somewhere secure, like a password manager. It will not be shown again.
Step 3: Configure the SDK for Future Use
Once you have your permanent API Key, you must set it as an environment variable to authenticate all future requests from the SDK.
In any new terminal session, run the appropriate command:
# On Windows Command Prompt (CMD)
set JINGONGO_API_KEY="your_permanent_api_key_here"
# On macOS, Linux, or PowerShell
export JINGONGO_API_KEY="your_permanent_api_key_here"
Tip: To avoid setting this variable in every new terminal, you can add this command to your system's profile script (like .bashrc, .zshrc, or your PowerShell profile). You are now fully authenticated and ready to use the Jingongo SDK!