How to have a Voice OTP feature in Pega
- Get link
- X
- Other Apps
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.
"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:
- Get link
- X
- Other Apps
Comments
Good post Samuel. Keep doing good work 💯💯
ReplyDeleteThanks alot :)
DeleteHai, Can you make post on integrating OCR(VIsion API) with pega?
ReplyDeleteVoice 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