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

Rent a Phone Number by API: A Guide to the OtpGet Rental API

Rent a Phone Number by API: A Guide to the OtpGet Rental API

A temporary number lives for minutes and receives one code. A rental keeps the same number for days, so you can log in again, receive repeated codes and keep an account tied to one number. The OtpGet Rental API gives you all of that from code.

The rental endpoint

https://otpget.com/stubs/rental-handler.php?api_key=YOUR_API_KEY&action=ACTION_NAME

Actions at a glance

ActionWhat it does
getRentalCountriesCountries that have rentable numbers
getRentalPricingPrices by duration
getAvailableRentalsWhat can be rented right now
rentNumberRent a number
getMyRentalsAll your active and past rentals
getRentalSMSRead every SMS received on a rented number
renewRentalExtend a rental before it ends
cancelRentalCancel a rental

The rental flow

  1. List countries and pricing, then check availability.
  2. Rent the number and store the rental id.
  3. Use the number on your target service.
  4. Read messages with getRentalSMS whenever you need a code. Unlike a temporary order, many messages can arrive on the same rental.
  5. Renew before the end date if you want to keep the number.

When rentals beat temporary numbers

  • Accounts you must log into repeatedly.
  • Services that send a fresh code at each login.
  • Team workflows where several people need the same number.
  • Customer support or testing where the number must stay stable.

Tip: automate renewals

Run a daily job that calls getMyRentals, finds rentals ending soon, and calls renewRental for the ones you want to keep. You never lose a number by forgetting a date.

Start building with OtpGet

Create a free account at otpget.com, copy your API key from the dashboard and open the API documentation. Our support team is available 24/7 if you get stuck.

Tags

#rental number API #rent phone number #long-term number #rentNumber #getRentalSMS
Contact us