Pega and Whatsapp Integration

Image
 Pega and Whatsapp Integration Following the procedure from  Official Whatsapp Cloud API 1. Set up Developer Assets and Platform Access The  WhatsApp Cloud API  and  WhatsApp Business Management API  are part of Meta’s Graph API, so you need to set up a Meta developer account and a Meta developer app. To set that up: Register as a Meta Developer  Enable two-factor authentication for your account  Create a Meta App : Go to  developers.facebook.com  >  My Apps  >  Create App . Select the "Business" type and follow the prompts on your screen. Click the app you want to connect to WhatsApp from the App Dashboard. Click Set up when you locate the "WhatsApp" product by scrolling down. Following that, you will have the choice to choose an existing Business Manager (if you have one) or, if you prefer, have one created for you automatically through the onboarding process (you can customize your business later, if needed). Make...

How to have a Voice OTP feature in Pega

           Two Factor Authentication Pega (Voice OTP)  

 



Step 1 : We will be using the service from https://2factor.in/v3/?at_category=2factor&at_event_action=spr&service=BULK-SMS-OTP-SERVICE-PROVIDER. Sign up for a free trial if you are just trying it out.


Step 2 : Login to your account and go to account summary




Step 3 :  Note down your API key which we will need to establish connection


Step 4 : Now go to https://2fa.api-docs.io/v1/send-voice-otp/sending-voice-otp-auto-generated-otp and in the left navigation pane choose either auto generated OTP or custom OTP).


Step 5 : In the appropriate choice select try it out and copy the end point URL in my case I use Custom OTP  ( http://2factor.in/API/V1/api_key/VOICE/phone_number/otp ).


Step 6 : Now login to pega and , configure-> integrations -> connectors -> create rest integration. 


Step 7 : Give a source name , choose api_key, phone_number, otp as the resource parameters and click Next.




Step 8 :  In the add response page choose either file or add rest response option

    a) Add rest response option :         {

                                                                “api_key”: “your key”,

                                                                “phone_number”: “samplenumber”,

                                                                “otp”: “samplenumber”

                                                            }

        Copy paste this in the request page of the post type and check for status good response and submit

                                                    (Or)

    b)Add file :

notepad -> copy paste the above code and save it as .json and add it as a file in the add a file  option




 Step 9 : Choose next and select the Int class and Data class as per your path additional also create datapage If you need them , I used datapage for easy use.

    




 Step 10 : Your done ! Now go to app explorer and choose the path you selected for the datapage creation , select your datapage add pyWorkPage in the pages and classes tab.







Step 11 : Under the request data transform pass the parameters apikey ,phonenumber, and the otp . Open the Data transform and you could find your api_key, phone_number,otp in target and in the source use your pyWorkPage to set the target or hardcode the values for trying it out.






 

 Step 12 : Test your connector by calling it via activity or datapage and check your results Click on actions -> run on the datapage.

"In the parameter of datapage enter the api key , phone number and the OTP to be sent, Since we are using OTP from pega end generate a randonmID in pega and can send it as OTP via a property)

                                                        (Optional)


Step 13 : If using activity to call the connector make sure before calling the activity

Use method “Apply Data transform” and set the Request Data transform with the values(similar to datapage request data transform) and then use method “Connect-Rest” and call the connector passing the parameter.

Connector Configuration Photo:




Final Video Output: 




Comments

  1. Good post Samuel. Keep doing good work 💯💯

    ReplyDelete
  2. Hai, Can you make post on integrating OCR(VIsion API) with pega?

    ReplyDelete
  3. Voice OTP is a game-changer for businesses, helping them reach a wide audience. It reduces fraud and enhances security, making it perfect for financial services, E-Commerce, and customer support.

    ReplyDelete

Post a Comment

Popular posts from this blog

Pega and Whatsapp Integration

Razorpay and Pega Integration