Skip to content

Managed secret providers

Hugging Face

Connect Hugging Face to Alter Vault for secure API access

Use Hugging Face credentials to make authenticated API calls through Alter Vault without exposing API keys in code.

PropertyValue
Provider IDhuggingface
CategoryAI
Credential TypeAccess Token

Log in to Hugging Face

Log in to Hugging Face at huggingface.co.

Navigate to Access Tokens

Navigate to Settings > Access Tokens at huggingface.co/settings/tokens.

Create a token

Click Create new token and choose a role (fine-grained, read, or write).

Copy the token

Copy the token (starts with hf_) — it is only shown once.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add Hugging Face

Go to Managed Secrets > Add Provider > Hugging Face.

Enter credentials

Paste your Access Token into the credential field.

Save

Click Save. You’ll receive a grant_id to use with the SDK.

response = await alter_app.request(
HttpMethod.GET,
"https://huggingface.co/api/whoami-v2",
grant_id="YOUR_GRANT_ID",
)