Unlocking Secure OTP Verification with Phone Email API in Android

How to use Phone.email REST API in Android to send Free OTP SMS?

Phone email Admin
Phone Email App

27 September 2023 6 mins read

In present digital age, security is paramount, especially when it comes to verifying users' identities. One widely-used method for user verification is through OTPs (One-Time Passwords) sent via SMS. OTPs provide an additional layer of security by ensuring that only the intended user can access their accounts or services. However, SMS costs can add up, and this is where Phone Email's innovative Free SMS OTP API solution comes into play. Phone Email offers a REST API that allows developers to send free OTP SMS to Indian users. In this blog post, we will guide you through the process of using the Phone Email REST API in your Android app for sending free OTP SMS.

free phone number verification otp for android by phone email

Getting Started with Phone Email API

To begin using the Phone Email REST API for sending free OTP SMS, you'll need to follow these steps:

  1. Install the Phone Email Android App
    Before you can access the API, you need to install the Phone Email Android App from the Google Play Store. This app will provide you with the necessary API key required for sending free OTP SMS.
  2. Obtain Your API Key
    After installing the Phone Email Android App, open it and sign in or create an account if you haven't already. Once you're logged in, navigate to the Business Profile section to get your API key. This key will be used to authenticate your requests when sending OTP SMS.

    Now that you have your API key from the Phone Email Android App, you can start integrating it into your Android application to send free OTP SMS. Below is a step-by-step guide on how to do this.
  3. Set up your Android project
    Before you can send OTP SMS, make sure you have an Android project set up. If you haven't already, create a new project or use an existing one.
  4. Make a HTTP request
    Phone Email provides a straightforward way to send OTP SMS through their REST API. You will need to make an HTTP POST request to the following endpoint:


    Here's an example of how to do it in Android using the OkHttp library:

        OkHttpClient client = new OkHttpClient().newBuilder().build();
        MediaType mediaType = MediaType.parse("text/plain");
        RequestBody body = RequestBody.create(mediaType,"{\n" +
                "\"apiKey\" : \"YOUR_API_KEY\",\n" +
                "\"fromCountryCode\" : \"+91\",\n" +
                "\"fromPhoneNo\" : \"YOUR_PHONE_NUMBER\",\n" +
                "\"toCountrycode\" : \"+91\",\n" +
                "\"toPhoneNo\" : \"RECIPIENT_PHONE_NUMBER\",\n" +
                "\"subject\" : \"OTP - OTP_DIGIT from Phone Email\",\n" +
                "\"messageBody\" : \"SGksCgoxMjM0NTYgaXMgeW91ciBPVFAg" +
                "dG8gbG9naW4gZm9yIFBob25lIEVtYWls\",\n" +
                "\"tinyFlag\" : true\n" +
        Request request = new Request.Builder()
                .method("POST", body)
        Response response = client.newCall(request).execute();

    In this code snippet, replace YOUR_API_KEY OUR_PHONE_NUMBER, and RECIPIENT_PHONE_NUMBER with the appropriate values.

    • • YOUR_API_KEY: Use the API key you obtained from the Phone Email Android App.
    • • YOUR_PHONE_NUMBER: Your own phone number.
    • • RECIPIENT_PHONE_NUMBER: The phone number where you want to send the OTP.
  5. Handle the response
    After making the API request, you can handle the response to check if the OTP SMS was sent successfully. Phone Email's API will return a response that you can use to confirm the status of your request.

Limitations and Considerations

It's important to note that Phone Email's Free SMS OTP API service is currently available only to Indian users. However, for global users, Phone Email provides an alternative solution. Global users can use the Phone Email API to receive OTPs within the Phone Email App.

User verification is a crucial aspect of mobile app development, and OTPs are a popular choice for enhancing security. By using Phone Email's REST API, you can send free OTP SMS to Indian users, reducing the cost and complexity of user verification in your Android app. Follow the steps outlined in this guide to get started with Phone Email's OTP verification API and enhance the security of your mobile applications.

Remember to stay up-to-date with Phone Email's services and any changes or updates they may make to their API. This will ensure that your Android app continues to provide a secure and seamless user experience.

By incorporating Phone Email's innovative solution into your Android app, you can streamline the user verification process and provide a more secure environment for your users, all while saving on SMS costs.

Try it today

Get Started

Discover our offerings through the Admin Dashboard for a comprehensive exploration of our products and services.

Related Posts

Phone email Admin

Sending and Receiving Emails via Phone Numbers

In today's digital age, communication has evolved significantly. From the traditional methods of sending letters and making phone calls, we have moved on to emails, instant messaging apps, and social media. However, one aspect of communication has remained relatively unchanged: the need for email addresses. But what if there was a way to send and receive emails using just a phone number? Enter the Phone Email App, a groundbreaking solution that's changing the way we think about email communication.

22 September 2023 3 mins read
Phone email Admin

Send free OTP to verify phone number

Phone Email's OTP Verification is a powerful tool that can help businesses bolster their security, reduce bounce rates, build user trust, and optimize the user experience. Prioritizing data security and simplifying OTP delivery, Phone Email is the go-to solution for businesses seeking success in the digital world, where trust, efficiency, and customer satisfaction reign supreme.

22 September 2023 3 mins read
Phone email Admin

Revolutionizing Email: Say Goodbye to complex email addresses with...

In today's digital age, email communication has become an integral part of our personal and professional lives. However, the complexity and limitations of traditional email addresses can often be a source of frustration. But fear not! Phone.Email, a cutting-edge email provider, is here to revolutionize the way we send and receive emails. With its Android app and innovative features, Phone.Email simplifies email communication by allowing users to send emails using phone numbers instead of complex email IDs. Let's delve deeper into the benefits of Phone.Email and how it is reshaping the world of email.

22 September 2023 3 mins read