2022-11-27 00:36:17 +08:00
## Configuration
To use this provider, add an entry to `creds.json` with `TYPE` set to `PORKBUN`
along with your `api_key` and `secret_key` . More info about authentication can be found in [Getting started with the Porkbun API ](https://kb.porkbun.com/article/190-getting-started-with-the-porkbun-api ).
Example:
2023-03-02 22:17:27 +01:00
{% code title="creds.json" %}
2022-11-27 00:36:17 +08:00
```json
{
"porkbun": {
"TYPE": "PORKBUN",
"api_key": "your-porkbun-api-key",
"secret_key": "your-porkbun-secret-key",
}
}
```
2023-03-02 22:17:27 +01:00
{% endcode %}
2022-11-27 00:36:17 +08:00
## Metadata
This provider does not recognize any special metadata fields unique to Porkbun.
## Usage
2023-03-11 14:42:01 +01:00
An example configuration:
2022-11-27 00:36:17 +08:00
2023-03-11 14:42:01 +01:00
{% code title="dnsconfig.js" %}
2023-01-20 13:56:20 +01:00
```javascript
2022-11-27 00:36:17 +08:00
var REG_NONE = NewRegistrar("none");
var DSP_PORKBUN = NewDnsProvider("porkbun");
2023-06-17 14:58:17 +02:00
D("example.com", REG_NONE, DnsProvider(DSP_PORKBUN),
2022-11-27 00:36:17 +08:00
A("test", "1.2.3.4")
);
```
2023-03-11 14:42:01 +01:00
{% endcode %}