@k-msg/channel
Channel and sender number management for the K-Message platform.
Installation
Section titled “Installation”npm install @k-msg/channel @k-msg/core# orbun add @k-msg/channel @k-msg/coreFeatures
Section titled “Features”- Channel Management: Complete channel lifecycle management
- Sender Number Registration: Automated sender number registration and verification
- Business Verification: Business information verification for AlimTalk channels
- Permission Management: Role-based access control for channels
- Status Monitoring: Real-time channel status monitoring
Runtime Compatibility
Section titled “Runtime Compatibility”- Works in Edge runtimes without
nodejs_compat(no runtime dependency on Node built-ins).
Basic Usage
Section titled “Basic Usage”import { ChannelService } from '@k-msg/channel';
const channelService = new ChannelService();
// Create a new AlimTalk channelconst channel = await channelService.createChannel({ name: 'My Business Channel', provider: 'iwinv', businessInfo: { name: 'My Company Ltd.', registrationNumber: '123-45-67890', category: 'E-COMMERCE', contactEmail: 'contact@mycompany.com', contactPhone: '02-1234-5678' }});
// Register sender numberconst senderNumber = await channelService.addSenderNumber(channel.id, { phoneNumber: '15881234', purpose: 'MARKETING'});Channel Verification
Section titled “Channel Verification”// Verify business informationconst verification = await channelService.verifyBusiness(channel.id, { documents: [ { type: 'BUSINESS_LICENSE', url: 'https://docs.example.com/license.pdf' }, { type: 'REPRESENTATIVE_ID', url: 'https://docs.example.com/id.pdf' } ]});
// Check verification statusconst status = await channelService.getVerificationStatus(channel.id);console.log('Verification status:', status);Sender Number Management
Section titled “Sender Number Management”// List all sender numbers for a channelconst senderNumbers = await channelService.getSenderNumbers(channel.id);
// Verify sender number with SMSawait channelService.verifySenderNumber(senderNumber.id, '123456');
// Check sender number statusconst numberStatus = await channelService.getSenderNumberStatus(senderNumber.id);License
Section titled “License”MIT