This tutorial will guide you on how to rent a phone number and receive inbound SMS.
To follow this tutorial, you will need:
- An account with karix.io. Please sign-up, if you haven't already.
- Some credits in your account to rent a phone number.
- A web hosting provider to host your web application that will receive messages.
Pro Tip: All karix.io users get free credits to try out the platform. After creating an account, simply verify your phone number from the dashboard and claim your free credits! |
Step 1: Create a Webhook
Note: This step is only needed if you want the inbound SMS received on your rented phone numbers to be pushed to your app/servers. If not configured, your numbers will still receive the SMS and will show under the logs page. |
A webhook is nothing but a configuration that stores your web app URLs. These are the URLs karix.io will push inbound SMS to. To receive SMS to your application, the numbers you rent must have a webhook attached to them.
After logging in, navigate to the webhooks page
Click on the “Create Webhook” button, this will open a modal like below:
- Enter a name for this webhook
- Enter your primary SMS notification URL. This will be the URL Karix.io will call using the HTTP method configured by you to deliver the SMS received on your rented numbers that have this webhook attached
- Optionally, enter a fallback notification URL and method.
- Click on Create Webhook
You have successfully created a webhook. It will now be listed under the Webhooks section in the Dashboard
Pro Tip: karix.io also provides REST APIs to create and manage webhooks. Refer to Documentation for more details |
Step 2: Rent a Phone Number to Receive SMS
At karix.io we provide phone numbers in 20 countries that you can instantly add to your account and use them to receive SMS. After logging in, navigate to the Numbers page, pick a country of your choice from the drop-down and search.
You will see the numbers available for rent along with their setup charge, monthly rental and cost per inbound SMS (if any)
Next, click the rent button for the number that you want to add to your account. This will open a modal window (as shown below):
- Chose an alias (optional) for this phone number
- Attach the previously created webhook to this number (optional)
- Click “Rent Now”
You have now successfully rented a number and attached a webhook to it.
Pro Tip: karix.io also provides REST APIs to search for and rent/unrent numbers. Refer to the Documentation section for more details. |
Step 3: See it in Action!
Using your phone, send an SMS to your newly rented phone number.
You will see the SMS under the Logs page. Click the message timestamp for more details.
karix.io will also push the message to your SMS notification URL configured in the webhook attached to the number. The request will contain following parameters
- UID: A unique ID generated for each SMS
- Destination: The rented number on which the SMS was received
- Source: The number of the user that sent the SMS
- Rate: Rate of SMS
- Parts: Total parts of the SMS (more than 1 for long SMS)
- Total_Cost: Rate multiplied by parts
- Text: The content of the SMS
- Created_Time: The time at which the SMS reached karix.io
- Message_Type: SMS
- Current_Status: The status of the SMS (received)
- Direction: Inbound
For more details, please refer to Documentation and FAQs