Node.js용 이메일 검증 SDK
무료 플랜이 가능합니다. 신용카드가 필요하지 않습니다.
NPM 설치
npm 또는 yarn을 통해 EmailVerify Node.js SDK를 설치합니다.
npm install emailverify-sdk
개발자 가이드
1 표준 검증
실시간 SMTP 검증을 위한 공식 Node.js 클라이언트입니다. Express, NestJS 또는 모든 최신 JS 환경에 원활하게 통합할 수 있도록 async/await를 완벽하게 지원합니다.
const { EmailVerify } = require('emailverify-sdk');
const client = new EmailVerify('your_api_key');
async function checkEmail() {
const result = await client.verify('[email protected]');
console.log(result.isValid ? 'Deliverable' : 'Bounce');
}
2 높은 처리량의 배치 API
모든 규모의 목록을 처리합니다. 당사의 배치 엔진은 동시성 및 재시도를 자동으로 처리하여 인프라 오버헤드를 최소화하면서 검증된 결과를 제공합니다.
const emails =['[email protected]', '[email protected]'];
const batch = await client.createBatch(emails);
// Check progress
const status = await client.getBatchStatus(batch.id);
if (status.percent === 100) {
const results = await client.getBatchResults(batch.id);
console.log(results);
}
3 사용자 정의 클라이언트 구성
필요에 맞게 SDK를 조정합니다. 엔터프라이즈급 안정성 및 보안을 위해 사용자 정의 시간 초과, 재시도 전략 및 프록시 설정을 구성합니다.
const client = new EmailVerify('key', {
timeout: 5000, // 5 second timeout
retryCount: 3, // Auto-retry on 5xx errors
userAgent: 'MyEnterpriseApp/1.0',
proxy: 'http://proxy:8080'
});
4 전문 Finder API
이름과 도메인에서 전문 이메일 주소를 찾습니다. 아웃리치가 받은 편지함에 도달할 수 있도록 다계층 검증이 지원됩니다.
const result = await client.finder.find({
firstName: 'Elon',
lastName: 'Musk',
domain: 'tesla.com'
});
if (result.email) {
console.log(`Verified Email: ${result.email}`);
}
5 스마트 구문 유효성 검사
반송되기 전에 오타를 막으세요. 일반적인 철자 오류를 자동으로 감지하고 등록 중에 사용자에게 즉각적인 제안을 제공합니다.
const { isSyntaxValid, suggestion } = client.validateSyntax('[email protected]');
if (suggestion) {
console.log(`Did you mean ${suggestion}?`); // [email protected]
}
6 네이티브 TypeScript 지원
우수한 개발자 경험을 위해 TypeScript로 구축되었습니다. 모든 검증 응답 및 구성에 대해 완벽한 유형 안전성 및 자동 완성을 즐기십시오.
import { EmailVerify, VerificationResult } from 'emailverify-sdk';
const client = new EmailVerify('key');
const res: VerificationResult = await client.verify('[email protected]');
console.log(res.score);
7 고급 오류 복원력
완벽한 애플리케이션을 구축하세요. SDK에는 속도 제한 및 네트워크 문제에 대한 특정 오류 클래스가 포함되어 있어 강력한 복구 논리를 쉽게 구현할 수 있습니다.
try {
await client.verify('[email protected]');
} catch (err) {
if (err instanceof EmailVerify.RateLimitError) {
// Wait and retry
} else if (err instanceof EmailVerify.NetworkError) {
// Check connection
}
}
8 일회용 및 봇 감지
품질이 낮은 가입으로부터 플랫폼을 보호하세요. 지표에 영향을 미치기 전에 실시간으로 임시 이메일 서비스 및 의심스러운 봇을 식별합니다.
const res = await client.verify('[email protected]');
if (res.isDisposable) {
console.log('Temporary email detected.');
}
if (res.isBot) {
console.log('Suspected automated sign-up.');
}
자주 묻는 질문
Node.js SDK는 async/await를 지원합니까?
물론입니다. 네트워크에 바인딩된 모든 메서드는 Promise를 반환하므로 최신 비동기 워크플로에 적합합니다.
브라우저에서 사용할 수 있습니까?
SDK는 API 키를 보호하기 위해 서버 측에서 사용하도록 설계되었습니다. 클라이언트 측 유효성 검사를 위해 백엔드를 통해 안전한 API 엔드포인트를 사용하십시오.
CommonJS 및 ESM을 지원합니까?
예, 패키지는 `require` 및 `import` 구문을 모두 지원하도록 컴파일됩니다.
속도 제한은 어떻게 처리됩니까?
제한에 도달하면 SDK에서 명확한 오류 유형을 제공하므로 자체 백오프 또는 대기열 논리를 구현할 수 있습니다.