Managed secret providers
InfluxDB
Connect InfluxDB to Alter Vault for secure API access
Overview
Section titled “Overview”Use InfluxDB credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | influxdb |
| Category | Database |
| Credential Type | API Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Log in to InfluxDB Cloud
Log in to InfluxDB Cloud.
Open API Tokens
Go to Load Data > API Tokens.
Generate a token
Generate an All Access or custom (bucket-scoped) token and copy it — it is only shown once.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add InfluxDB
Go to Managed Secrets > Add Provider > InfluxDB.
Enter credentials
Paste your API Token into the credential field.
Save
Click Save. You’ll receive a grant_id to use with the SDK.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.POST, "https://YOUR-REGION.cloud2.influxdata.com/api/v2/query", grant_id="YOUR_GRANT_ID", query_params={"org": "YOUR-ORG"}, json={ "query": 'from(bucket: "metrics") |> range(start: -1h) |> limit(n: 5)', "type": "flux", },)- The token is injected as
Authorization: Token <token>; InfluxDB 3 endpoints also acceptBearer.