API Key acquisition and usage
Memory API uses API Key authentication. Pass the key via the
Configure as an environment variable:
Each request carries the
Authorization header.
Get credentials
1
Open the console
Open the Bailian console and log in with your Alibaba Cloud account.
2
Get API Key
Obtain
DASHSCOPE_API_KEY from the console, starting with sk-. See Get API Key.Usage
Configure as an environment variable:
Authorization header:
Permissions
- Alibaba Cloud primary account: can call all endpoints directly
- RAM sub-accounts: require appropriate permissions
- API Key scope is configured in the console
Security best practices
- Never in repos: use environment variables
- Per-app keys: use separate keys for each app
- Rotate regularly: change keys periodically