-
Notifications
You must be signed in to change notification settings - Fork 0
/
KaveNegar_Example.h
35 lines (23 loc) · 970 Bytes
/
KaveNegar_Example.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include "SMS_Sender/SMS_Sender.h"
void KaveNegarExample()
{
Notofication::KaveNegarSetting KaveNegarSetting;
KaveNegarSetting.Api_Base_Url = "https://api.kavenegar.com/v1/";
KaveNegarSetting.SendSmsRoute = "/sms/send.json";
KaveNegarSetting.SendOtpSmsRoute = "/verify/lookup.json";
KaveNegarSetting.API_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
Notofication::KaveNegar KaveNegar(KaveNegarSetting);
string number = "09120000000";
string token = "4242";
string template_name = "TestOTP";
string error;
if (!KaveNegar.SendOTPSms(number, token, template_name, error))
cout << error << endl;
string message = "test";
string sender_number = "12439211021000";
Notofication::RecieversPhoneNumber RPN;
RPN.push_back(number);
if (!KaveNegar.SendSms(message, sender_number, RPN, error))
cout << error << endl;
}//KavehNegarExample