মূল কনটেন্টে যান
Localtonet Localtonet ড্যাশবোর্ড

এই পেজ এখনো বাংলা ভাষায় নেই। ইংরেজিতে দেখানো হচ্ছে।

SMS bot

এই পাতার সহায়তা
এই পেজে 7 সেকশন
  1. How it works
  2. Before you start
  3. Set up the SMS app
  4. Download and install
  5. Allow the permissions
  6. Sign in with the token
  7. Log in to the Telegram bot
  8. Open the bot
  9. Send /login with your API key
  10. Commands
  11. Examples
  12. Troubleshooting
  13. Related pages

The Localtonet SMS app turns an Android phone into an SMS endpoint: it reports incoming SMS, sends SMS and dials USSD codes. You control it from Telegram with the Localtonet SMS bot, or from the dashboard.

How it works #

  • The Localtonet SMS app runs on the Android phone and signs in with an AuthToken.
  • The Localtonet SMS bot is a Telegram bot. After you log in with your API key, it sends you the SMS that arrive on your phones and accepts commands for them.
  • The dashboard can send SMS and run USSD codes too: on the SMS tab of a device in Proxy Manager, and under SMS settings of a token in My Tokens.

Before you start #

  • An Android phone with a SIM card. The SMS app is built for Android 5.0 and newer.
  • An AuthToken for that phone. If the Localtonet app already runs on the phone, use the same token: the dashboard connects the SMS app to a device by its token.
  • Your API key. It is shown on the Dashboard under API Key.
  • A Telegram account, to use the bot.

Set up the SMS app #

  1. Download and install #

    Download the SMS app for Android from localtonet.com/download/localtonet-smsapp.zip. The same link is behind Download SMS app on the SMS tab of a device in Proxy Manager. Extract the archive and install the app on the phone. Android asks you to allow installing apps from this source first.

  2. Allow the permissions #

    Open Localtonet Sms. The app asks for the permissions it works with:

    PermissionNeeded to
    Send SMSSend messages from the phone's SIM card.
    Read SMS, receive SMSRead the inbox and report incoming messages.
    Phone callsRun USSD codes. The app dials them.
    CameraScan the QR code of a token.
    NotificationsShow the notification of the app while it runs.
  3. Sign in with the token #

    Type or paste the token into Enter Authtoken, or scan the token's QR code from My Tokens, then select Save. The app shows the token name, your plan and the connection state. Connected and Listening Sms mean it is ready. Wrong Token means the token is not valid. Logout signs the app out.

Leave the app running. Commands reach the phone only while the SMS app is connected.

Log in to the Telegram bot #

  1. Open the bot #

    Open t.me/localtonet_sms_bot in Telegram and start a chat.

  2. Send /login with your API key #

    Telegram
    /login <API_KEY>

    The bot answers You are now authorized as followed by your account email. A wrong key is answered with Invalid API key.

From now on the bot sends every SMS that arrives on a phone of your account to this chat. Each message shows the token name of the phone, the sender's number and the text.

The API key controls your whole account, not only SMS. Send /login only in the private chat with the bot, never in a group. If the key leaks, change it on the Dashboard with Change in the API Key card, and log in to the bot again with the new key.

Commands #

/login takes your API key. The other commands take the AuthToken of the phone they are for. Separate the parts with single spaces.

CommandWhat it doesArguments
/login <API_KEY>Links this Telegram chat to your account.Your API key.
/helpShows the list of commands.None.
/readallsms <AUTH_TOKEN> <HOURS>Reads the SMS inbox of the phone and sends you the messages received in the last hours.The token of the phone and a whole number of hours. Without the number, the last hour is read.
/sendussdcode <AUTH_TOKEN> <USSD_CODE>Dials a USSD code on the phone.The token of the phone and the code, for example *123#. The code must not contain spaces.
/sendsms <AUTH_TOKEN> <PHONE_NUMBER> <MESSAGE>Sends an SMS from the phone's SIM card.The token of the phone, the recipient's number with country code and no spaces, then the message. The message can contain spaces.

Examples #

Telegram
/readallsms <AUTH_TOKEN> 1
/sendussdcode <AUTH_TOKEN> *123#
/sendsms <AUTH_TOKEN> +15615557689 Hello
  • After /readallsms the bot answers Reading all Sms and then sends the messages one by one.
  • After /sendsms the bot answers Sending Sms with the number. When the phone reports that the message was sent and delivered, the bot passes these reports on.
  • After /sendussdcode the bot answers Sending ussd code with the code. The bot only confirms that the code was sent to the phone.

Troubleshooting #

You need to authorize first. Use /login <apikey>

This chat is not logged in, or the login was lost. Send /login <API_KEY> again.

Invalid API key

Copy the key again from the Dashboard. Write the command as /login, one space, then the key, with nothing after it.

You need to enter authtoken and …

The command does not have the right number of parts. Check the table above: /sendussdcode needs exactly a token and a code, /sendsms needs a token, a number and a message.

The bot confirms a command but nothing happens on the phone

Check that the token in the command is the one the SMS app signed in with, that the app shows Connected, and that it has the SMS and phone permissions.

Incoming SMS stopped arriving in Telegram

Messages are sent to the chat that logged in with your current API key. If you changed the API key, send /login with the new key. Also check that the SMS app on the phone is still connected.

The dashboard says You need to purchase balance to use this feature

Sending SMS and running USSD codes from the dashboard needs Balance on your account. See Plans and Balance.

সাপোর্ট