英文:
How to generate OTP in Power apps(OTP should appear in Phone Number) || instead of Phone number I tried using Email ID
问题
Your account, mattcatania13 has been suspended for violating the ChatGPT Rules.
Specifically, for:
Violating our rules against abuse, harassment, aggressive behavior, and attempting to engage in illegal activities.
You may not engage in the targeted harassment of someone, incite other people to do so, being rude, or asking ChatGPT to provide illegal information. This includes wishing or hoping that someone experiences physical harm, insulting or being aggressive to someone, or asking for illegal information.
The account will be terminated within 30 days.
Note that if you attempt to evade a permanent suspension by creating new accounts, we will suspend your new accounts. If you wish to appeal this suspension, please contact our support team.
英文:
I want to generate OTP of 4digits and One Time Password should come in registered Phone number.
I tried using 3rd party app but couldn't achieve this.
My data source is SQL.
Can't really able to do so, as I am unable to find the custom connector in power apps( I tried the steps generated on ChatGPT)
答案1
得分: 0
我试图自己完成这个任务,因为我找不到任何帮助的来源。所以我了解到,如果我们想通过手机号发送OTP,那么我们需要获得一个付费的服务(这可能是我不正确的理解),而我尝试通过电子邮件地址发送OTP。
如果您想要实现这个目标,以下是步骤:
步骤1 -
创建一个按钮,您想要生成OTP。我提供了以下代码 -
Reset(TextInput2_1); //重置文本输入,用户将用它来输入OTP
Set(Votp,Right(Rand(),5)); //我设置了一个变量,生成随机数,并只取5位数
Gmail.SendEmail(DataCardValue6.Text,{Subject:"在这里输入您的主题名称", Body:"您希望将您的正文放在这里 " & Votp}); //这是您想要生成的电子邮件
Navigate(OTPScrn) //导航到另一个屏幕
步骤2
在输入OTP后,需要添加另一个按钮来检查OTP是否正确,然后登录。
在登录按钮中,我添加了以下内容 -
If(Votp = TextInput2_1.Text, Navigate(HomePage), Notify("无效的OTP", NotificationType.Error));
注意-我只创建了两个屏幕,一个屏幕中包含了电子邮件ID和生成OTP按钮,而第二个屏幕包含了OTP输入和登录按钮。我还尝试插入图片,但由于我在这里还是新手,所以无法进行,它要求一些声望。
希望您明白了,如果您遇到任何问题,请在这里告诉我。谢谢。
英文:
I tried to do this by self as I couldn't able to get any source of help. So I got to know that If we want to send the OTP through the Phone number then for that we need to get a paid service(might be I'm not correct in this), instead of that I tried to send the OTP through Email Id.
Here are the steps if you want to achieve this -
step 1-
Create a Button in which you want to generate the OTP. And I gave the following codes -
Reset(TextInput2_1); // resetting the text input which user will use for entering the OTP
Set(Votp,Right(Rand(),5)); // I set a variable and generating the random number and taking only 5 digits using right()
Gmail.SendEmail(DataCardValue6.Text,{Subject:"Put your subject name here", Body:"How you want your body should be put here "&Votp}); // this is the Email that you want to generate
Navigate(OTPScrn) // Navigating to another screen
Step -2
after that entering the OTP need to add another button for checking the Otp is correct or not then log in.
In the Log in button I have added -
If(Votp = TextInput2_1.Text, Navigate(HomePage), Notify("Invalid OTP", NotificationType.Error));
Note- I've created two Screen in one only Email ID and Generate OTP button and in the 2nd Screen Otp input and log in button. I tried tried to insert the pictures as well but I'm new here so I couldn't able to it is asking some reputation.
Hope you guys understand, If further any issue you're facing let me know here. Thank You.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论