BIMI Validator checks if a domain has a valid BIMI record published in DNS. BIMI enables domain owners to display verified logos in supported email clients.
npm install @apiverve/bimivalidatorshell
npm install @apiverve/bimivalidator
`
Using yarn:
`shell
yarn add @apiverve/bimivalidator
`
---
Configuration
Before using the BIMI Record Validator API client, you have to setup your account and obtain your API Key.
You can get it by signing up at https://apiverve.com
---
Quick Start
Get started with the Quick Start Guide
The BIMI Record Validator API documentation is found here: https://docs.apiverve.com/ref/bimivalidator.
You can find parameters, example responses, and status codes documented here.
$3
`javascript
const bimivalidatorAPI = require('@apiverve/bimivalidator');
const api = new bimivalidatorAPI({
api_key: '[YOUR_API_KEY]'
});
`
---
Usage
---
$3
Using the API is simple. All you have to do is make a request. The API will return a response with the data you requested.
`javascript
var query = {
domain: "ebay.com"
};
api.execute(query, function (error, data) {
if (error) {
return console.error(error);
} else {
console.log(data);
}
});
`
---
$3
You can also use promises to make requests. The API returns a promise that you can use to handle the response.
`javascript
var query = {
domain: "ebay.com"
};
api.execute(query)
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});
`
---
$3
You can also use async/await to make requests. The API returns a promise that you can use to handle the response.
`javascript
async function makeRequest() {
var query = {
domain: "ebay.com"
};
try {
const data = await api.execute(query);
console.log(data);
} catch (error) {
console.error(error);
}
}
`
---
Example Response
`json
{
"status": "ok",
"error": null,
"data": {
"bimi_host": "default._bimi.ebay.com",
"bimi_record": "v=BIMI1;l=https://bimi.entrust.net/ebay.com/logo.svg;a=https://bimi.entrust.net/ebay.com/certchain.pem",
"bimi_records_count": 1,
"has_bimi_record": true,
"host": "ebay.com",
"svg_logo": {
"file_size_bytes": 1633,
"status_code": 200,
"url": "https://bimi.entrust.net/ebay.com/logo.svg",
"valid": true
},
"valid": true,
"version": "BIMI1",
"vmc_certificate": {
"status_code": 200,
"url": "https://bimi.entrust.net/ebay.com/certchain.pem",
"valid": true
}
}
}
``