Free Numbers Pricing Reviews Feedback Terms & Policy API Docs Blog About
Log in Get Started
2 views 8 min read
Back to Blog
Tutorials

Migrate to the SMS Feel API in Minutes

Migrate to the SMS Feel API in Minutes

Moving an existing integration to a new provider usually sounds like a week of refactoring. With the SMS Feel API migration path, it is closer to a coffee break. The request and response shapes are plain HTTPS with JSON bodies, and the change itself is small: point your client at a new host and swap in a new API key. If your service already requests virtual numbers and reads incoming codes over HTTP, you keep your client code, your queue, and your retry logic.

The direct answer is simple. An SMS Feel API migration changes only two things: the base API host your client talks to, and the API key used for authentication. Everything else, from the number request to the way you poll for the incoming OTP code, stays as it is. Your application still decides when a user needs verification, still stores a hash rather than the plain code, and still enforces expiry and attempt limits. The security logic lives in your service, and none of that moves.

What the SMS Feel API migration actually changes

Every other line in your integration is reusable. The two things that must change are the base host and the API key. Replace the old hostname in your configuration with the SMS Feel endpoint, https://smsfeel.com/stubs/handler_api.php, and keep it in an environment variable rather than scattered through the codebase. Then create a key inside your SMS Feel account and swap the value your client sends. Every request includes the key as a query parameter, in the form ?api_key=YOUR_KEY, and the key is generated in the SMS Feel dashboard. Retire the old key once the previous provider is fully out of the picture, but not before. Nothing in your parsing code changes.

A verification flow has three steps: request a virtual number for a country and service, poll for the incoming SMS until the code arrives or your timeout fires, and release the number when you are done so it returns to the pool. Because those steps are stable, a client written around them keeps working, and it only needs a new address. If you also send email codes, the same principle applies, and SMS Feel provides temporary email alongside virtual numbers, so a single account can cover both channels without a second integration.

The actions you will use, and what they return

Before you move traffic, it helps to know the actions by name. The getBalance action returns your current balance, and it is the first thing to check, because it proves the key works before you spend anything. The getPrice action returns the price for a service in a country. The getNumber action orders a number. It takes a service identifier, a country identifier, and a type value from 1 to 5, with 1 as the default, and returns the phone number and the order identifier. The getStatus action checks an order by its identifier, returning STATUS_WAIT_CODE while the code is still on its way, and STATUS_OK with the code once it arrives. The getStatusV2 action is the newer variant of the same check.

The setStatus action closes the loop. A status of 8 cancels the order for a refund, and that is only allowed within two minutes of purchase. A status of 3 or 6 completes a successful activation, and that is only allowed after a code has arrived. There is also a webhook option that pushes the code to you instead of making you poll. Prices and balances are shown in PKR by default, and an optional currency parameter converts the displayed amounts. The error codes follow a familiar pattern: 401 means a bad key, 402 means insufficient balance, 404 means not found, and 502 means an upstream error.

A step by step checklist for the move

Start by creating an SMS Feel account and generating a test API key. Move both values, the host and the key, into environment variables or a secrets manager, and do not commit them to version control. Next, run a single number request in a low-cost country and print the raw JSON response before any parsing runs. Compare the JSON keys against what your parser expects. In most clients the diff is empty, and the only adjustment is a different error message string.

Then run the complete loop: request a number, wait for the OTP code, and release the number with setStatus. Point a staging job at the new host with a small concurrency limit and watch the success rate for a day, then switch production during a low-traffic window and keep the old credentials available for a short rollback period. The guide to your first API key walks through key generation, and the rate limits guide explains how to poll without being throttled.

Testing the migration without burning numbers

A migration does not need hundreds of orders. Ten well-chosen runs teach you more than a thousand blind ones. Test one country with reliable inventory, one country with tight inventory, a service that sends long messages, and a deliberately invalid key so you can see the error body. Log the raw response, the HTTP status, and the time between the request and the arrival of the code, and keep a small table of the results.

If delivery time is consistent and the release request succeeds, the integration is healthy. If the release request fails repeatedly, you will slowly leak inventory and your test balance will drain faster than expected, so the release step belongs in every test run. Also test the cancel path on purpose: buy a number, cancel it with setStatus and a status of 8 inside the two-minute window, and confirm the refund lands. The guide to how SMS OTP verification works is useful background here, and the developer guide to virtual numbers covers the number types you will be ordering.

Running both providers side by side

You do not have to switch everything at once. Running both providers side by side is a sensible way to de-risk the change. Route a small percentage of traffic to the new host, compare delivery times and success rates, then increase the share gradually. This only works if your code can choose a host per request, so put the host and key behind one configuration value per provider and let a simple percentage or a feature flag decide which one a request uses.

While the two run together, watch delivery time from request to code arrival, the share of orders that time out, the share of release requests that succeed, and the balance burn per hundred orders. If those look the same on both sides, the migration is done and the only remaining step is turning the old host off. Order identifiers remain strings you can store in the same column, so no schema change is needed.

Common mistakes that turn a short job into a long one

The most common mistake is hardcoding the new host in several places instead of reading one configuration value. The second is assuming API key formats are portable between providers. They are not, so generate a fresh key in the SMS Feel dashboard. The third is ignoring timeouts: an OTP that arrives after your poll window closes is a wasted number, so set the window deliberately and log when it fires.

The fourth mistake is forgetting the release request, which quietly burns balance during test runs. The fifth is deleting the old credentials immediately, leaving no rollback path if traffic spikes. The sixth is skipping the raw-response check, then blaming the provider for a parser that expected different field names. Read one error response from each endpoint during testing so you know the exact wording your logs will contain. A rental number is worth considering too if your flow needs the same number for weeks rather than minutes. Check the live price in your dashboard before your first order, and the pricing page gives you the broader picture.

Frequently asked questions

Do I need to rewrite my client to move to the SMS Feel API?

No. The request and response flow stays the same style, so the code that builds the request and reads the incoming code continues to work. Only the host and the key change. Run one raw request first and compare the JSON keys with what your parser expects.

How long does the migration actually take?

For a single service with one integration, most of the work is configuration and testing rather than code. A staging switch takes an afternoon and a production switch the following day. The slow part is watching a day of staging traffic, not writing code.

Can I run both providers side by side?

Yes, and it is a sensible way to de-risk the change. Route a small percentage of traffic to the new host, compare delivery times and success rates, then increase the share gradually.

Do I need to change my database schema?

No. Order identifiers remain strings you can store in the same column. If you want extra observability, add a provider column so historical records make clear which host handled each request.

An SMS Feel API migration is a configuration change with a testing habit attached, not a rewrite. Change the host, change the key, run the loop once, then move traffic in steps. When you are ready, create your SMS Feel account, generate a key, verify it with getBalance, and run your first request. The receive SMS online page shows the receiving side of the service if you want to see how an order looks from the dashboard first.

Tags

#api migration guide #otp api integration #virtual numbers api #api key setup #developer guide #migration checklist
Contact us