How to verify an account using SMS or Call - web

I am working on an eCommerce website but our client told us to add functionalists like they want to verify an user account by sms or by call.
I don't know how to do this and how many of websites and apps do this.
Do they use any third party services or can we implement it by our won?
If we have to use this service please tell me the name and how much it costs and how to setup?
If there is any alternative please tell em that also.
Moreover I want to use this services for testing also.
Any help would be appreciated.

Some websites/apps build it themselves with SMS / Voice APIs...
Others use a Verification specific API...
With SMS / Voice APIs
You'll need to generate a code
Send it via the channel you use primarily
Set some kind of time delay job (queue, worker, whatever)
Send a fallback message should you get no response from the user
With an SMS API, that likely varies per country,there is a solution that allows you to go globally with an API call for a flat fee of 10 cents per verification, NOT per attempt (unsuccessful attempts will not be charged towards your account)
Nexmo’s Verify API
Make a call to https://api.nexmo.com/verify/json (or /xml)
Add parameters: api_key, api_secret, verified number, brand
Optional parameters: language, length
Take a look at the Nexmo's Verify documentation here!
Verification code should arrive to your phone as an SMS. If you wait a while, you'll also get a phone call, and the code will be read to you. The timing and channels used depends on the type of number, the country, and the carrier.
Reasons to implement Nexmo's Verify
Landline & Mobile Verification
Failover & Retry Sequences
Simplicity.. Just make one API call
Other alternatives: Enterprises (sign a heavy/clunky contract)
Full disclosure, I work at Nexmo

Related

How to get instant changes in background from private api in mobile app?

I am planning to create a mobile application for android and ios users, i think i will take a try with xamarin since i will be alone on this project and i don't have a lots of time.
I want that the mobile app for both platform get datas from the api, then if there is new datas available we notify the user by a notification.
How the mobile will work in that kind of project? I mean should i make a background service then check every x seconds/minutes by http request? In that case which time interval? Should i use websockets instead for this case?
The app might be used by many people, so i would to know the scenario in this kind of project: Getting very fast changes, without overload the server due to too many connects or whatever else.
I'm confused about this and i need some lights around, any mobile application/server experiences related would be apprecied!
EDIT:
As suggered by an user, here additional infos:
The api is homemade, restful using JWT made in NodeJS.
Each users on their device should get messages from server asap, even when the app is in background/closed.
Maybe in the future a way to send messages between users themselves.
You have to implement push notification.
It is quite easy to implement this in xamarin. just send the push notification to the device and on the notification received call back send the API request to retrieve the updated data.
Here is the document for sending push notification from custom API.
https://learn.microsoft.com/en-us/appcenter/push/pushapi
I'm not a mobile developer, so take this with a grain of salt.
The answer to this really depends on what you're doing, which informs how often to check the API. If it's a messaging app, for example, you could have it check every couple minutes to see if there are undelivered messages, then check more frequently for the next X minutes (to facilitate a conversation in real time).
If it's a GPS navigation app to be used while driving, you'd need much more frequent requests.
As for the API, that also depends on what type of API and the number of requests you can make to it. Is it a commercial API that you get x number of calls per hour on? Is it an API that you built? Etc.
Basically, you need to give more information in order to get more specific answers.

How to use Dialogflow Phone gateway and handling it in backend platform like nodejs

I'm trying to understand phone gateway implementation in dialogflow but dont see much of documentation for how to handle in backend code using nodejs or any third party apps like twilio,viber etc.
My doubt is whether is it available for now or not and is their any documents regarding phone gateway which can be done through google mini device for voice calling?
Please correct me if I'm wrong about what I understand.
Dialogflow phone gateway is a great feature provided by Dialogflow. It is simple to activate. Just follow the instructions in the Integrations tab.
All your intents and webhook will just work fine as they do in the bot. But the response type is little different from other platforms. So check that once before building responses.
It only supports speech response that is returned to the user in the phone call.
as per Google documentation, it uses the V2Beta1 version of the API. It means you have all the normal fields of the V2 API inside the body and parameters of the webhook call (+1 "MlEnabled" field, but not important for the telefony gateway). See more here https://dialogflow.com/docs/reference/v2-beta-v2-migration-guide-api . I have also been searching for extra fields like the phone number who is calling (to use it in backend tasks like CRM lookup), but this is not there yet (I analysed the JSON response, there is nothing so far).
Some tip to integrate with Twilio (my use case too) : you can perfectly route the twilio call to a simple Twilio callflow (like checking for opening hours) then to the incoming DialogFlow number (as you would do with the black number of an IVR provider) and transfer the Dialogflow call to another incoming phone numbers (controlled by Twilio) where you do the rest of the callflow (typically the skill based routing).
Example : after the call, Twilio checks for opening hours > OK > forward to Dialogflow phone nbr for intent recognition > identify intent nbr1 > route to phone nbr1 of Twilio which is connected to a routing/queue to agent group nbr1 (idem for intents nbr2, 3, 4 ...).
In this example, some useful fields are missing in the JSON like the phone nbr of the caller(CLI), the phone number dialed, eventually some UUI ISDN field, ... that you would like to use for a CRM lookup and CTI popup. Let's keep an eye on it and maybe Google will add it in V2beta2 ...?

How Can You Block Twilio Numbers From Registering

We have a sensitive service and only want one sign up per person, more or less. We require phone number verification when signing up. Looking into people we've caught creating multiple accounts we see they use twilio numbers, but this is a manual process of looking up the carrier, etc. etc.
Is there a way to automate this and block twilio numbers? I know craigslist and gmail are able to do this, but I'm not sure how.
Thanks.
Twilio developer evangelist here.
You can use the Lookups API to check carrier details about a phone number. Carrier details will include whether Twilio is the carrier.
Let me know if this helps at all.

Creating new payment method for Bigcommerce

I would like to know if this is possible to add new payment method for Bigcommerce. I tried to contact their support without any luck. If anyone is familiar with bigcommerce and know if this is possible, i would appreciate any advice.
I already read their API docs and didn't found anything useful - only method to obtain list of available payment methods.
I already tried to signup for their partner. Without any luck.
We've done this before for a couple stores to allow clients to process payments through their own processor. The way we achieved this, is essentially through the following high-level steps:
Allow payments by Check (or similar offline method). We are going to replace this with the custom processor.
You'll notice that if you attempt to checkout via Check, that BigCommerce automatically creates the order for you, but sets the order status to Awaiting Payment. Upon submission the user is automatically sent to a 'Thank You' Order Confirmation page that contains both the Order ID and some payment instructions (such as where to send the check to).
Here's the trick -- Modify this 'Order Thank You' page to prompt the user for her or his credit card information. A simple HTML form will suffice here, performing the actual request via JavaScript.
Once you have the user's credit card data, you can then POST it to your own external server, where you would connect to and send data to whichever processor you are using. Additionally, you should make sure to send the Order ID to this program, so that you can connect to the BigCommerce API to load billing information, and then subsequently adjust the order status to either approved or declined depending on the response from your processor. Finally, you should send back some sort of response to the client to inform of the result of the charge attempt.
That's pretty much it in a nutshell. The way you integrate with the payment processor (step 4) is unique to whichever processor you are using. I hope this makes sense.
Although opinion based, I'm a huge fan of serverless technologies, and would suggest looking into AWS Lambda + AWS API Gateway. The benefit here is that you don't need to worry about creating an infrastructure or the associated concerns of security and scale. Rather, AWS Lambda allows you to simply upload your software, and allows it to be executed via an HTTP request to some defined endpoint set through the API Gateway. Lambda will scale automatically for you, and you don't need to worry about system level security concerns - only security at the application level. It's truly a set and forget setup, and a bleeding edge technology. Not to mention dirt cheap!
Implementing a new payment method is unsupported and requires hacky workarounds since we implement payment gateways via the core app. You can do this on blueprint by using an offline payment method and then using the API to update payment statuses, etc. I'd recommend using ActiveMerchant if you do wish to go down this path.

Nexmo - how to send messages to US/Canada based mobile numbers

I am trying to send SMS to the people all over the world using a non-registered short codes, but the sms cannot be delivered to US or Canada. How do I achieve this?
Is there an API to get information of the country using a phone number, so that I can know if the current number is of US or Canada's?
(Disclaimer: I work at Nexmo.)
To identify US vs CA numbers you can use Nexmo's Number Insight API. Besides the country you can also get lots of info, landline or mobile, carrier, reachable or not, etc.
If you you want to send to the US using short codes without needing a short code yourself, you can also use our US Short Codes API. If your use case fits into what we support (two-factor authentication, alerts, or marketing).

Resources