# SMS 2 step verification

**URL:** https://community.thunkable.com/t/sms-2-step-verification/74781
**Category:** Questions about Thunkable X
**Tags:** sms
**Created:** [April 17, 2019, 4:02pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781 "2019-04-17T16:02:34Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)
#### Post date: [April 17, 2019, 4:02pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/1 "2019-04-17T16:02:34Z")

</div>

Hello everyone,

I’d like to implement an SMS 2 step verification in my app, I know it can be done ‘easily’ directly with a phone app that ‘reacts’ to a firebase db variable change, I’m checking online SMS services but I don’t know what I should do with them, any help please?

I have this, but I don’t know how to use it:

curl -X “POST” “[https://rest.nexmo.com/sms/json](https://rest.nexmo.com/sms/json)”   
-d “from=Pizza App”   
-d “text=Hello from Nexmo”   
-d “to=393284\*\*\*\*\*\*\*”   
-d “api\_key=e\*\*\*\*\*\*\*”   
-d “api\_secret=TiyN9\*\*\*\*\*\*\*YlAQi”

or this exampleJSON

```auto
{
  "message-count": 1,
  "messages": [
    {
      "to": "447700900000",
      "message-id": "0A0000000123ABCD1",
      "status": "0",
      "remaining-balance": "3.14159265",
      "message-price": "0.03330000",
      "network": "12345"
    }
  ]
}

```

Would be much appreciated, thanks.

---

<div class="post-metadata">

### Author: ![Red\_Panda](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/red_panda/32/19387_2.png) [@Red\_Panda](https://community.thunkable.com/u/Red_Panda)
#### Post date: [April 17, 2019, 6:55pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/2 "2019-04-17T18:55:50Z")

</div>

have a look at the `Web API` component [documentation here](https://docs.thunkable.com/web-api)

---

<div class="post-metadata">

### Author: ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)
#### Post date: [April 17, 2019, 7:15pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/3 "2019-04-17T19:15:33Z")

</div>

I’ve seen it but still don’t know what to do, I’ll look for some tutorial online

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [April 17, 2019, 7:19pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/4 "2019-04-17T19:19:07Z")

</div>

Two quick things @maxb;

1. Darren has some really engaging and comprehensive videos about APIs you can watch here:

> [@Web API Component Example (with videos)](http://community.thunkable.com/t/web-api-component-example-with-videos/73864):
>
> Background One component I’ve been interested in lately is the Web API. The Web API enables your app to retrieve data from a service on the web like weather patterns or currency exchange rates over the past 20 years. In my example, I use the [https://www.openbrewerydb.org/](https://www.openbrewerydb.org/) API to search for microbreweries by city and state. You can find this API and many others here: [https://github.com/toddmotto/public-apis](https://github.com/toddmotto/public-apis). Tutorial 1 My first tutorial covers the basics of calling, reading, and display data f…

1. We’re always looking to improve our documentation… when you say:

> [@maxb](#):
>
> I’ve seen it but still don’t know what to do

Can you give me some feedback as to what would make this doc easier to understand, easier to implement, just easier in general really! 😂

Thanks!

---

<div class="post-metadata">

### Author: ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)
#### Post date: [April 17, 2019, 7:47pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/5 "2019-04-17T19:47:16Z")

</div>

Thank you @domhnallohanlon, useful as always, but I don’t know if I’m getting this right;

The user should insert their phone number, and click ‘verify’, so (as far as I understood the possibilities of web api) the app should:  
1 - generate a 4 digit code  
2 - make a web call to the SMS sending service giving that code and the user’s phone number  
3 - the service should then send the SMS to the user’s phone which then imputs the 4 digits for verification match etc etc

Should it be a post method? and i should insert into the body of the web call some info that I don’t get,  
or am I getting it entirely wrong and this is not how web apis work?  
I suppose this is the documentation i need to understand but I don’t know how to compile the body of the web call: [https://developer.nexmo.com/api/sms#send-an-sms](https://developer.nexmo.com/api/sms#send-an-sms)

P.s. (I understand that this method is not hacker proof - and would gladly discuss that, i mean, how does an hacker or anybody see how the app behaves step by step - it is just the fastest and still reliable one I could think of for now.  
I know how to make it hacker proof if i could program the server that sends the sms like if it was an app.)

---

<div class="post-metadata">

### Author: ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)
#### Post date: [April 19, 2019, 10:46am UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/6 "2019-04-19T10:46:04Z")

</div>

I’m getting closer as there is an ‘automatic’ verification system on the service I’m trying,

curl -X GET “[https://api.nexmo.com/verify/json](https://api.nexmo.com/verify/json)?  
api\_key=ea8\*\*\*\*\*  
&api\_secret=Ti\*\*\*\*\*\*\*\*\*\*\*\*  
&number=393\*\*\*\*\*\*\*  
&brand=Nexmo  
&code\_length=4”

I copied the text above  
ut I can’t make it work 😕

![From x.thunkable.com](https://screenshotscdn.firefoxusercontent.com/images/15e7fd4b-f1c0-47c8-bcb5-a719ee3421e7.png?embedded=og)

(In the screenshot the text is a little bit different) What am I doing wrong?

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [April 19, 2019, 10:53am UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/7 "2019-04-19T10:53:22Z")

</div>

But what response to you get from the server?  
200:OK?

Does it wait until the 4 digit code is received?

---

<div class="post-metadata">

### Author: ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)
#### Post date: [April 19, 2019, 10:54am UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/8 "2019-04-19T10:54:35Z")

</div>

I was just gonna post that, i receive:

{“status”:“2”,“error\_text”:“Missing api\_key”}

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [April 19, 2019, 11:00am UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/9 "2019-04-19T11:00:05Z")

</div>

In your URL you have

`/json?\?api_key`

You’ll need to remove the ?\ part and try again.

---

<div class="post-metadata">

### Author: ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)
#### Post date: [April 19, 2019, 11:57am UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/10 "2019-04-19T11:57:02Z")

</div>

I copied the exact code on the site and says missing apikey, that was a variable I tried

I think a problem was while copying the code it inserts the \ simbol, i removed that and now it give me an “invalid value for param app\_id. Facility not allowed” problem

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 29, 2020, 4:50pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/11 "2020-01-29T16:50:09Z")

</div>

Hey! Did you ever find a solution to this?

---

<div class="post-metadata">

### Author: ![maxb](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maxb/32/35200_2.png) [@maxb](https://community.thunkable.com/u/maxb)
#### Post date: [February 19, 2020, 5:03pm UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/12 "2020-02-19T17:03:23Z")

</div>

No, if I want firebase to know if the user is identified or not I have to use e mail or I can’t have data security for firebase data

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:40am UTC](https://community.thunkable.com/t/sms-2-step-verification/74781/13 "2024-11-08T11:40:55Z")

</div>


