ଅଂଶୀଦାର କରନ୍ତୁ
ୱେବ୍ ହକ୍ ଆମର ପ୍ଲାଟଫର୍ମର ଅନ୍ୟତମ ଉପଯୋଗୀ ବ features ଶିଷ୍ଟ୍ୟ | ଏହା ବିକାଶକାରୀ ଏବଂ ସାଇଟ୍ ମାଲିକମାନଙ୍କୁ ଡିଭାଇସ୍ କିମ୍ବା ହ୍ ats ାଟସ୍ ଆପ୍ ସର୍ଭରରୁ ଇଭେଣ୍ଟଗୁଡିକ ଶୁଣିବାକୁ ଅନୁମତି ଦିଏ, ଯାହା ସ୍ୱୟଂଚାଳିତ କାର୍ଯ୍ୟ ସୃଷ୍ଟି ପାଇଁ ଉପଯୋଗୀ | ଏହି କାର୍ଯ୍ୟଟି କେବଳ ଇଭେଣ୍ଟ ଗ୍ରହଣ କରିବା ପାଇଁ ଡିଜାଇନ୍ ହୋଇଛି, ଯେପରିକି sms, ହ୍ ats ାଟସ୍ ଆପ୍ ଚାଟ୍, ussd ପ୍ରତିକ୍ରିୟା, ଏବଂ ଆଣ୍ଡ୍ରଏଡ୍ ବିଜ୍ଞପ୍ତି |
ପୋଷ୍ଟ ହୋଇଛି: ଫେବୃଆରୀ 10, 2023 - 1,815 ଦର୍ଶନ
କେସ୍ ବ୍ୟବହାର କରନ୍ତୁ |
- SMS ଏବଂ ହ୍ ats ାଟସ୍ ଆପ୍ ପାଇଁ ଏକ ସ୍ୱତ b ପ୍ରବୃତ୍ତ ବଟ୍ ସୃଷ୍ଟି କରନ୍ତୁ |
- ଗ୍ରହଣରେ ନିଜ ଡାଟାବେସରେ ବାର୍ତ୍ତା ଏବଂ ଚାଟ୍ ସଞ୍ଚୟ କରନ୍ତୁ |
- ଗ୍ରହଣ ଉପରେ ଆପଣଙ୍କର ନିଜ ଡାଟାବେସରେ ବିଜ୍ଞପ୍ତି ସଞ୍ଚୟ କରନ୍ତୁ |
- ଗ୍ରହଣରେ ଆପଣଙ୍କର ନିଜ ଡାଟାବେସରେ USSD ପ୍ରତିକ୍ରିୟା ସଞ୍ଚୟ କରନ୍ତୁ |
- ନିର୍ଦ୍ଦିଷ୍ଟ ଇମେଲ ଠିକଣାଗୁଡ଼ିକୁ ପେଲୋଡ୍ ପଠାନ୍ତୁ |
- ଯେତେବେଳେ ଆପଣ ଫେସବୁକରୁ ଏକ ବିଜ୍ଞପ୍ତି ପାଇବେ ଏକ SMS / ଚାଟ୍ ପଠାନ୍ତୁ |
- ଯେତେବେଳେ ଆପଣ ଏକ ଆପରୁ ବିଜ୍ଞପ୍ତି ପାଇବେ କିଛି କରନ୍ତୁ |
ଏହା କିପରି କାମ କରେ |
ସିଷ୍ଟମ୍ ଉଭୟ ଉତ୍ସରୁ ଏକ ଗ୍ରହଣୀୟ ଇଭେଣ୍ଟ ପାଇଥାଏ, ତା’ପରେ ୱେବହକ୍ url ଆହ୍ .ାନ ହେବ ଏବଂ ପେଲୋଡ୍ ଡାଟା ପଠାଯିବ | ଯେତେବେଳେ ତୁମର ୱେବହକ୍ ସର୍ଭର ଏହାକୁ ଗ୍ରହଣ କରେ, ତୁମେ ନିଜେ ପେଲୋଡ୍ ସହିତ କିଛି କରିପାରିବ | ଦକ୍ଷ ବିତରଣ ନିଶ୍ଚିତ କରିବାକୁ POST ପଦ୍ଧତି ସହିତ ପେଲୋଡ୍ ପଠାଯାଏ |
ପେଲୋଡ୍ ଗଠନ
ପେଲୋଡ୍ ଗଠନ ସରଳ; ଆପଣଙ୍କୁ କେବଳ ପେଲୋଡ୍ ପ୍ରକାର ଯାଞ୍ଚ କରିବାକୁ ପଡିବ ଏବଂ ତା’ପରେ ଡାଟା ବଡିର ବିଷୟବସ୍ତୁ ପ୍ରକ୍ରିୟାକରଣ କରିବାକୁ ପଡିବ |
# sms
[
"type" => "sms", // type of payload: received sms
"data" => [
"id" => 2, // unique id from the system
"rid" => 10593, // unique id from the device
"sim" => 1, // sim card slot
"device" => "00000000-0000-0000-d57d-f30cb6a89289", // device unique id
"phone" => "+639760713666", // sender phone number
"message" => "Hello World!", // message
"timestamp" => 1645684231 // receive timestamp
]
]
[
"type" => "whatsapp", // type of payload: received whatsapp chat
"data" => [
"id" => 2, // unique id from the system
"wid" => "+639760713666", // whatsapp account phone number
"phone" => "+639760666713", // sender phone number
"message" => "Hello World!", // message
"timestamp" => 1645684231 // receive timestamp
]
]
# ussd
[
"type" => "ussd", // type of payload: received ussd response
"data" => [
"id" => 98, // unique id from the system
"sim" => 1, // sim card slot
"device" => "00000000-0000-0000-d57d-f30cb6a89289", // device unique id
"code" => "*143#", // ussd code
"response" => "Sorry! You are not allowed to use this service.", // ussd response
"timestamp" => 1645684231 // receive timestamp
]
]
# notification
[
"type" => "notification", // type of payload: received notification
"data" => [
"id" => 77, // unique id from the system
"device" => "00000000-0000-0000-d57d-f30cb6a89289", // device unique id
"package" => "com.facebook.katana", // application package name
"title" => "Someone commented on your post!", // notification title
"content" => "Someone commented on your post!", // notification content
"timestamp" => 1645684231 // receive timestamp
]
]
କୋଡ୍ ଉଦାହରଣ |
Webhooks)
/**
* Validate webhook secret
*/
if(isset($request["secret"]) && $request["secret"] == $secret):
// Valid webhook secret
$payloadType = $request["type"];
$payloadData = $request["data"];
// do something with the payload
print_r($payloadType);
print_r($payloadData);
else:
// Invalid webhook secret
endif;