Automate SSL certificate issuance via acme.sh using the BEST-HOSTING DNS API for DNS-01 challenge validation.
Log in to the BEST-HOSTING client portal and navigate to Profile / REST API to generate your BH_API_USER and BH_API_KEY.
If you don't have acme.sh installed yet:
curl https://get.acme.sh | sh -s email=your@email.com
export BH_API_USER="your_api_user"
export BH_API_KEY="your_api_key"
acme.sh --issue --dns dns_bh -d example.com \
-d '*.example.com' --dnssleep 120
All API endpoints (except this page) require HTTP Basic Authentication:
Authorization: Basic base64(BH_API_USER:BH_API_KEY)
BH_API_USER — your unique account identifier issued by the portal.
BH_API_KEY — your secret API key. Treat it like a password and never share it.
When rate limited, the API returns 429 Too Many Requests with Retry-After, X-RateLimit-Limit and X-RateLimit-Remaining headers.