Community & Resources
Shiftmag
Newsletter & magazine for developers
Shift conference
Leading developers conference in Southern Europe
Products
Solutions
Industry verticals
Finance
Reassure customers with secure interactions
Retail & eCommerce
Boost conversion and increase customer loyalty
Telecoms
Build superior CX solutions across the entire telecom customer journey
Healthcare
Deliver a fast, convenient patient experience in-person or at home
Transportation
Deliver superior transportation and logistics customer experience
Government solutions
Transforming citizen engagement with AI
Department
Marketing
Unleash the power of omnichannel marketing automation
Sales
Optimize your sales with intelligent automation
Customer service
Provide efficient customer service on the most popular channels
Telecoms
Telecom core & security
Anam Protect Firewall
Secure your network from SMS and Voice fraud with our firewall that protects 120+ operators
SMS Firewall
Ensure all A2P SMS traffic is properly charged and eliminate revenue leakage with our SMS Firewall
Global Interconnectivity
Leverage RCS for telecoms to increase connectivity globally
Partnership
Developers
Community & Resources
Shiftmag
Newsletter & magazine for developers
Shift conference
Leading developers conference in Southern Europe
Resources
Date
Title
Authenticate customers with WhatsApp OTPs
Provide customers with a simple way to validate their identity on a chat app they know and love.
Safeguard customer accounts with a trustworthy channel
Customers worldwide trust WhatsApp to send personal messages and documents and prefer to use WhatsApp to interact with businesses.
Offer your customers an easy but effective way to verify their identity and speed up the authentication process. With end-to-end encryption, secure delivery and global compliancy measures, we help you send one-time pins on WhatsApp that keep your customers satisfied.
Secure your customers’ information and prevent attacks by enforcing OTP verification during login
The WhatsApp Business API encrypts all messages, meaning only the customer can view the message. This makes WhatsApp a more reliable channel to send OTPs on and lowers the chance of hackers getting their hands on both a password and an OTP.
final String platform =
const platform =
const string platform =
const platform =
platform =
platform =
$platform =
Java
Javascript
C#
Go
Python
Ruby
PHP
OkHttpClient client = new OkHttpClient ().newBuilder()
.build();
MediaType mediaType = MediaType.parse(
"application/json" );
RequestBody body = RequestBody.create(mediaType,
"{\"personData\":{\"externalId\":\"1\",\"firstName\":\"Jane\",\"lastName\":\"Smith\",\"address\":\"67 Farringdon Road\",\"city\":\"London\",\"country\":\"United Kingdom\",\"gender\":\"FEMALE\",\"birthDate\":\"1966-01-15\",\"middleName\":\"Janie\",\"profilePicture\":\"http://profile.com\",\"tags\":[\"VIP Customers\",\"New Customers\"],\"customAttributes\":{\"Contract Expiry\":\"2018-06-01\",\"Company\":\"Acme\"},\"contactInformation\":{\"phone\":[{\"number\":\"41793026727\"},{\"number\":\"41793026728\"}],\"email\":[{\"address\":\"[email protected] \"},{\"address\":\"[email protected] \"}]}},\"flowVariables\":{\"orderDate\":\"2021-09-01\",\"orderDetails\":\"Extended Weight, Discount\",\"orderNumber\":1234567}}" );
Request request = new Request .Builder()
.url(
"https://{baseUrl}/communication/1/flows/10159347/participants?phone&[email protected] &externalId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab&pushRegistrationId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab" )
.method(
"POST" , body)
.addHeader(
"Authorization" ,
"{authorization}" )
.addHeader(
"Content-Type" ,
"application/json" )
.addHeader(
"Accept" ,
"application/json" )
.build();
Response response = client.newCall(request).execute();
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"personData" : {
"externalId" :
"1" ,
"firstName" :
"Jane" ,
"lastName" :
"Smith" ,
"address" :
"67 Farringdon Road" ,
"city" :
"London" ,
"country" :
"United Kingdom" ,
"gender" :
"FEMALE" ,
"birthDate" :
"1966-01-15" ,
"middleName" :
"Janie" ,
"profilePicture" :
"http://profile.com" ,
"tags" : [
"VIP Customers" ,
"New Customers"
],
"customAttributes" : {
"Contract Expiry" :
"2018-06-01" ,
"Company" :
"Acme"
},
"contactInformation" : {
"phone" : [
{
"number" :
"41793026727"
},
{
"number" :
"41793026728"
}
],
"email" : [
{
"address" :
"[email protected] "
},
{
"address" :
"[email protected] "
}
]
}
},
"flowVariables" : {
"orderDate" :
"2021-09-01" ,
"orderDetails" :
"Extended Weight, Discount" ,
"orderNumber" :
1234567
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var client =
new RestClient(
"https://{baseUrl}/communication/1/flows/10159347/participants?phone&[email protected] &externalId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab&pushRegistrationId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab" );
client.Timeout =
-1 ;
var request =
new RestRequest(Method.POST);
request.AddHeader(
"Authorization" ,
"{authorization}" );
request.AddHeader(
"Content-Type" ,
"application/json" );
request.AddHeader(
"Accept" ,
"application/json" );
var body =
@"{""personData"":{""externalId"":""1"",""firstName"":""Jane"",""lastName"":""Smith"",""address"":""67 Farringdon Road"",""city"":""London"",""country"":""United Kingdom"",""gender"":""FEMALE"",""birthDate"":""1966-01-15"",""middleName"":""Janie"",""profilePicture"":""http://profile.com"",""tags"":[""VIP Customers"",""New Customers""],""customAttributes"":{""Contract Expiry"":""2018-06-01"",""Company"":""Acme""},""contactInformation"":{""phone"":[{""number"":""41793026727""},{""number"":""41793026728""}],""email"":[{""address"":""[email protected] ""},{""address"":""[email protected] ""}]}},""flowVariables"":{""orderDate"":""2021-09-01"",""orderDetails"":""Extended Weight, Discount"",""orderNumber"":1234567}}" ;
request.AddParameter(
"application/json" , body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
1
2
3
4
5
6
7
8
9
10
11
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main () {
<code>url :=
"https://%7BbaseUrl%7D/communication/1/flows/10159347/participants?phone&[email protected] &externalId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab&pushRegistrationId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab" method :=
"POST" payload := strings.NewReader(
`{"personData":{"externalId":"1","firstName":"Jane","lastName":"Smith","address":"67 Farringdon Road","city":"London","country":"United Kingdom","gender":"FEMALE","birthDate":"1966-01-15","middleName":"Janie","profilePicture":"http://profile.com","tags":["VIP Customers","New Customers"],"customAttributes":{"Contract Expiry":"2018-06-01","Company":"Acme"},"contactInformation":{"phone":[{"number":"41793026727"},{"number":"41793026728"}],"email":[{"address":"[email protected] "},{"address":"[email protected] "}]}},"flowVariables":{"orderDate":"2021-09-01","orderDetails":"Extended Weight, Discount","orderNumber":1234567}}` ) client := &http.Client { } req, err := http.NewRequest(method, url, payload)
if err !=
nil { fmt.Println(err)
return } req.Header.Add(
"Authorization" ,
"{authorization}" ) req.Header.Add(
"Content-Type" ,
"application/json" ) req.Header.Add(
"Accept" ,
"application/json" ) res, err := client.Do(req)
if err !=
nil { fmt.Println(err)
return }
defer res.Body.Close() body, err := ioutil.ReadAll(res.Body)
if err !=
nil { fmt.Println(err)
return } fmt.Println(
string (body))</code>
}
1
2
3
4
5
6
7
8
9
10
11
import http.client
import json
conn = http.client.HTTPSConnection(
"{baseUrl}" )
payload = json.dumps({
"personData" : {
"externalId" :
"1" ,
"firstName" :
"Jane" ,
"lastName" :
"Smith" ,
"address" :
"67 Farringdon Road" ,
"city" :
"London" ,
"country" :
"United Kingdom" ,
"gender" :
"FEMALE" ,
"birthDate" :
"1966-01-15" ,
"middleName" :
"Janie" ,
"profilePicture" :
"http://profile.com" ,
"tags" : [
"VIP Customers" ,
"New Customers"
],
"customAttributes" : {
"Contract Expiry" :
"2018-06-01" ,
"Company" :
"Acme"
},
"contactInformation" : {
"phone" : [
{
"number" :
"41793026727"
},
{
"number" :
"41793026728"
}
],
"email" : [
{
"address" :
"[email protected] "
},
{
"address" :
"[email protected] "
}
]
}
},
"flowVariables" : {
"orderDate" :
"2021-09-01" ,
"orderDetails" :
"Extended Weight, Discount" ,
"orderNumber" :
1234567
}
})
headers = {
'Authorization' :
'{authorization}' ,
'Content-Type' :
'application/json' ,
'Accept' :
'application/json'
}
conn.request(
"POST" ,
"/communication/1/flows/10159347/participants?phone=null&[email protected] &externalId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab&pushRegistrationId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab" , payload, headers)
res = conn.getresponse()
data = res.read()
print (data.decode(
"utf-8" ))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
require "uri"
require "json"
require "net/http"
url =
URI (
"https://{baseUrl}/communication/1/flows/10159347/participants?phone&[email protected] &externalId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab&pushRegistrationId=8edb24b5-0319-48cd-a1d9-1e8bc5d577ab" )
https =
Net::HTTP .new(url.host, url.port)
https.use_ssl =
true
request =
Net::HTTP::Post .new(url)
request[
"Authorization" ] =
"{authorization}"
request[
"Content-Type" ] =
"application/json"
request[
"Accept" ] =
"application/json"
request.body =
JSON .dump({
"personData" : {
"externalId" :
"1" ,
"firstName" :
"Jane" ,
"lastName" :
"Smith" ,
"address" :
"67 Farringdon Road" ,
"city" :
"London" ,
"country" :
"United Kingdom" ,
"gender" :
"FEMALE" ,
"birthDate" :
"1966-01-15" ,
"middleName" :
"Janie" ,
"profilePicture" :
"http://profile.com" ,
"tags" : [
"VIP Customers" ,
"New Customers"
],
"customAttributes" : {
"Contract Expiry" :
"2018-06-01" ,
"Company" :
"Acme"
},
"contactInformation" : {
"phone" : [
{
"number" :
"41793026727"
},
{
"number" :
"41793026728"
}
],
"email" : [
{
"address" :
"[email protected] "
},
{
"address" :
"[email protected] "
}
]
}
},
"flowVariables" : {
"orderDate" :
"2021-09-01" ,
"orderDetails" :
"Extended Weight, Discount" ,
"orderNumber" :
1234567
}
})
response = https.request(request)
puts response.read_body
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Integrate WhatsApp Business Platform API in an instant
Start unlocking opportunities to scale communications and grow engagement with a flexible API supported by developers.
Access detailed API documentation Get 24/7 integration support Create custom message templates
Expand your tech stack with multiple integration options
Easily implement the WhatsApp Business Platform into your existing tech stack and add on new integrations to build your B2C communication strategy.
Learn how to send an OTP on WhatsApp
Once you are set up, you can start sending triggered OTPs over WhatsApp API or through the Infobip platform. When a customer attempts to login to their account, it will trigger a message flow that provides the customers with a verification code over WhatsApp that they have to provide before getting access to their information.
Get set up and start sending OTP verification codes on WhatsApp
An Infobip account WhatsApp Business Platform Account An approved message template Customer opt-in
Learn how to send an OTP on WhatsApp
A customer logs into their account with a username and password
A new screen appears asking for an OTP that they should receive on WhatsApp
The customer will receive a notification from WhatsApp with their OTP
The customer inputs the OTP from the WhatsApp message and hits verify
The customer has successfully and securely logged in
Discover the benefits of WhatsApp OTPs
Using WhatsApp as a verification channel for bank accounts and accessing other sensitive materials can bring great benefits to your business and your customers.
Better security
WhatsApp messages are encrypted every step of the way. Unlike other channels, WhatsApp ensures that only the end user can view the delivered message and helps reduce spam, fraud attacks and hackers from accessing accounts.
High visibility for OTPs
WhatsApp has over 2 billion users. By sending OTPs on WhatsApp, your business can assure that customers are getting their verification codes on a reliable channel that they check regularly. Your OTP verification codes won’t get lost in an inbox full of unread messages.
Higher brand trust
WhatsApp uses branded and verified profiles for businesses to send messages to their customers. This means that your end-users can rest assured they are interacting with your business every time. With a brand logo, name and verified check, your customers know the OTP they were sent over WhatsApp comes from a trusted source.
Better user experience
By sending OTPs via WhatsApp, you can offer your customers a convenient yet secure way to verify their identity. Since they are familiar with the chat app and use it regularly, they know they will receive the OTP message on time, trust the sender ,and rely on their favorite app to verify their identity.
Start verifying identities with WhatsApp OTPs