Skip to main content

πŸ” Authentication

To access your TuringDB Cloud instance, authentication is required. TuringDB supports two simple authentication components:
  1. API Token β€” Proves your identity
  2. Instance ID β€” Identifies the specific graph database instance you’re working with
Both are required when using the SDK or making API requests.

πŸ”‘ 1. API Token

The API token is a secret key that authenticates you as a user. You can find and manage your tokens in the Settings > API Keys panel.

πŸ“‹ How to find your API token:

Step 1: Click your avatar (bottom-left corner) β†’ Settings
Get API
Step 2: Select the API Keys tab
Copy API Key
You can:
  • Click the πŸ‘οΈ icon to reveal your token
  • Click the πŸ“‹ icon to copy it to your clipboard
⚠️ Keep your API token secure β€” anyone with it can access your instance.

🧭 2. Instance ID

Each TuringDB instance has a unique Instance ID. This is used to route your requests to the correct graph engine.

πŸ“‹ How to find your Instance ID:

  • Go to the Instances page
  • Locate your instance card
  • Copy the Instance ID from the top-right corner
Instance ID

πŸ§ͺ SDK Authentication

Once you’ve created an instance, you can interact with it through the Python SDK or API using:
  • Your API token
  • Your Instance ID
Both are passed to the SDK to authenticate and target your requests.
client = TuringDBClient(
    instance_id="your-instance-id",
    api_token="your-api-token"
)
πŸ›ŽοΈ Note: The authentication gateway refreshes every 60 seconds, so after creating a new instance or token, you may need to wait up to 1 minute for access to be available.
⌘I