Updated dnsapi (markdown)

neil 2019-07-27 12:22:36 +08:00
parent 032d37115f
commit e8ec2c4331

@ -6,19 +6,27 @@ https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode
## 1. Use CloudFlare domain API to automatically issue cert
First you need to login to your CloudFlare account to get your [API key](https://dash.cloudflare.com/profile).
There are 2 ways to use cloudflare API.
1. Using the global api key:
First you need to login to your CloudFlare account to get your [API key](https://dash.cloudflare.com/profile).
```
export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export CF_Email="xxxx@sss.com"
```
2. Using the new cloudflare api token.
```
export CF_Token="sdfsdfsdfljlbjkljlkjsdfoiwje"
export CF_Account_ID="xxxxxxxxxxxxx"
```
Ok, let's issue a cert now:
```
acme.sh --issue --dns dns_cf -d example.com -d www.example.com
```
The `CF_Key` and `CF_Email` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
The `CF_Key` and `CF_Email` or `CF_Token`and `CF_Account_ID`will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
## 2. Use DNSPod.cn domain API to automatically issue cert