Managed secret providers
Hugging Face
Connect Hugging Face to Alter Vault for secure API access
Overview
Section titled “Overview”Use Hugging Face credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | huggingface |
| Category | AI |
| Credential Type | Access Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”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.
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 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.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.GET, "https://huggingface.co/api/whoami-v2", grant_id="YOUR_GRANT_ID",)