새로운 API 키 생성
To create an API key, select the Personal API key or Service Account API key tab for details.- Personal API key
- Service account API key
To create a personal API key owned by your user ID:
- Log in to W&B, click your user profile icon, then click User Settings.
- Click Create new API key.
- Provide a descriptive name for your API key.
- Click Create.
- Copy the displayed API key immediately and store it securely.
API 키 찾기
In Dedicated Cloud and Self-Managed:
- Organization admins can find or list API keys for all organization users and service accounts.
- Team admins can find or list API keys for service accounts in teams they administer.
- Non-admin users can find or list their own API keys.
- Personal API key
- Service account API key
To find a personal API key owned by your user ID:
- Log in to W&B, click your user profile icon, then click User Settings.
- Scroll to the API Keys section.
API 키 삭제
엑세스 권한을 취소하려면 API 키를 삭제하세요. 자세한 내용은 Personal API key 또는 Service Account API key 탭을 선택하여 확인하십시오.- Personal API key
- Service account API key
- wandb.ai/settings로 이동합니다.
- API Keys 섹션에서 삭제하려는 키 옆의 삭제 버튼을 클릭합니다.
API 키 교체
API 키를 교체(로테이션)하려면 다음 단계를 따르세요.- 새로운 API 키를 생성합니다.
- 모든 스크립트, 서비스 및 환경에서 새 API 키를 사용하도록 업데이트합니다.
- 모든 위치에서 새 API 키가 제대로 작동하는지 테스트합니다.
- 이전 API 키를 삭제합니다.
Store and handle API keys securely
API keys provide access to your W&B account and should be protected like passwords. Follow these best practices:Recommended storage methods
- Secrets manager: Use a dedicated secrets management system such as AWS Secrets Manager, HashiCorp Vault, Azure Key Vault, or Google Secret Manager.
- Password manager: Use a reputable password manager application.
- OS-level keychains: Store keys in macOS Keychain, Windows Credential Manager, or Linux secret service. Not suggested for production.
What to avoid
- Never commit API keys to version control systems such as Git.
- Do not store API keys in plain text configuration files.
- Do not pass API keys on the command line, because they will be visible in the output of OS commands like
ps. - Avoid sharing API keys through email, chat, or other unencrypted channels.
- Do not hard-code API keys in your source code.
Environment variables
When using API keys in your code, pass them through environment variables:SDK version compatibility
New API keys are longer than legacy keys. When authenticating with older versions of thewandb or weave SDKs, you may encounter an API key length error.
Solution: Update to a newer SDK version:
-
wandbSDK v0.22.3+ -
weaveSDK v0.52.17+
WANDB_API_KEY environment variable as a workaround.