Skip to main content

Credentials

1. Create an API key

  1. Sign in to the Tencent Cloud console
  2. Go to Access Management -> API Keys -> Create Key
  3. Copy the SecretId (access key id) and SecretKey (secret access key)
  4. Note your bucket’s region (e.g. ap-guangzhou) and the full bucket name including the APPID suffix (e.g. my-bucket-1250000000)
The endpoint is derived from region as cos.<region>.myqcloud.com.
Tencent COS bucket names always include the APPID suffix. Use the full name (with the suffix) for COS_BUCKET.

2. Set environment variables

# .env.development
COS_BUCKET=my-bucket-1250000000
COS_REGION=ap-guangzhou
COS_SECRET_ID=...
COS_SECRET_KEY=...
For Python configuration, see the Tencent resource docs.