sms.ir typescript package
npm i sms-typescript
- Angular, etc
import {Smsir} from 'sms-typescript/lib';
export class AppComponent implements OnInit{
smsWebService!: any;
constructor() {
this.smsWebService = new Smsir(
'Access_key', // string
'Line_number' // number
)
}
}
Send message to multiple mobile numbers
this.smsWebService.SendBulk(MessageText: string, Mobiles: string[], SendDateTime: number|null, line_number: number|null);
Send multiple messages to multiple mobile numbers pair to pair
this.smsWebService.SendLikeToLike(MessageText: string[], Mobiles: string[], SendDateTime: number|null, line_number: number|null)
Delete scheduled message pack
this.smsWebService.deleteScheduled(PackId: string)
Send verification code with predefined template
this.smsWebService.SendVerifyCode(Mobile: string, TemplateId: number, Parameters: { name: string; value: string }[])
get report of sent message
this.smsWebService.ReportMessage(MessageId: number)
get report of sent message pack
this.smsWebService.ReportPack(PackId: string)
get report of Today sent Messages
this.smsWebService.ReportToday(pageSize: number = 10, pageNumber: number = 1)
get report of Archived Messages
this.smsWebService.ReportArchived(fromDate: number|null, toDate: number|null, pageSize: number = 10, pageNumber: number = 1)
get report of latest received messages
this.smsWebService.ReportLatestReceived(count: number = 100)
get report of today received messages
this.smsWebService.ReportTodayReceived(pageSize: number = 10, pageNumber: number = 1)
get report of today received messages
this.smsWebService.ReportArchivedReceived(fromDate: number|null, toDate: number|null, pageSize: number = 10, pageNumber: number = 1)
get account credit
this.smsWebService.getCredit()
get account line numbers
this.smsWebService.getLineNumbers()
Please see CHANGELOG for more information what has changed recently.
The MIT License (MIT). Please see License File for more information.