txtecho - Get your cell phone number with SMS

  1. Text +1-248-686-2375
  2. Receive a text that contains your phone number
  3. Pricing: free for the first 3,333 requests ($50 on the twilio account)

 

This is demo

This is just a demonstration, not a product. Enjoy.

Why would you want to use this?

  1. My app needs a user to register their phone number before they can use the device on their account, so they need to see their phone number.
  2. But on mobile devices that use the SIM800H you may not be able to determine your current phone number with the AT+CNUM=? command since it's not implemented.
  3. So I use this code to automatically get the phone number on first startup.

Important Limitations

  1. This demonstration is limited to 1-text-per-second. Personal phone numbers are rate-limited to 1-text per second, so if people use this under high-load, it's likely that it won't work for everyone under high-load. Only 86400 requests can be fufilled per day. Short code phone numbers are not rate-limited but are expensive ($1,000 / mo) for a free demo.
  2. Rate-limiting on this service is not enforced, but it is a proof of concept and there's only $50 on the twilio account. If you're going to use it in production, sign up for your own twilio account and see the How to set up your own section below.

How to set up your own

  1. Sign up for Twilio
  2. Go to the "Developer Center" section in the primary menu. Then go to the "TwiML Bins" section and click the plus button to add a new TwiML bin.
  3. Here's the TwiML code:
    
    <?xml version="1.0" encoding="UTF-8"?>
    <Response>
        <Message to="{{From}}">
            {{From}}
        </Message>
    </Response>
    
  4. Simple, right?
Provided by Nanch for fun.