Verify SMS


User verification for accessing a system.

You can use this Verify SMS method to check if a user is the owner of the phone number they provided or as a two factor authentication.


We have two steps: Send and Check

Send: You provide us a phone number, and we send SMS to the client. the client has 10 minutes to enter the code back to your system.

Check: Once the client put his code, you deliver to us his phone number and the code, and we verify if the code is correct. a code can be used only once. Super simple!


Send


Settings:

URL

https://api.99digital.co.il/sms/verifySMS

Method

POST (form-data body)


Body:

Parameter

Description / Example

apiKey

Your API key for the service

from

from can be either Alphanumeric or a number (maximum of 11 characters) without '+972'.

for Alphanumeric: no restrictions.

for a number: the number must be approved by 99 digital to use.

to

The phone number to send the code to, without 00 or +972 or 972. example: 0501234567

message

As default, we use the following message to provide the code to the client: 

" Your verification code is: ##code## "

Alternatively, you can specify your own message, using this parameter. Please use this variable: "##code##" for the code syntax that we will generate from our side


Response:


{
"status": "OK",
"unique": "63433453",
"timestamp": 1600115719,
"from": "0501234567",
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

unique

unique ID for the message

timestamp

time stamp

from

sender number or text

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

from number is too long or too short

3

the number you are trying to use is not verified by 99 digital

5

unknown error, contact support

6

wrong apiKey

7

to can't be empty

9

from can't be empty

10

You provided 'message' parameter, but without ##code##


Check


Settings:

URL

https://api.99digital.co.il/sms/verifySMS

Method

POST (form-data body)


Body:

Parameter

Description / Example

apiKey

Your API key for the service

to

The phone number of the client, that received the SMS

code

The code that the client entered


Response:


{
"status": 1,
"phone": "0501234567",
}


Response-Explain:

Parameter

Description

status

'status' can be the following

1

Verification passed. the code entered correctly.

2

The code is wrong or does not exist

3

The code is invalid (more than 10 minutes passed)

phone

The phone number of the client