MissCallOTP   0.0.1


API Documentation

Metoda pengiriman one time password (OTP) menggunakan miss call. Kode OTP disisipkan pada 4 atau 6 digit terakhir dari nomor telepon yang diterima sebagai miss call.

To make a call to MissCallOTP API, send HTTP request using the following details:

Base URL https://api.mainapi.net/misscallotp/0.0.1
Endpoint /messages
  • (Optional) X-MainAPI-Username: <given username>
  • (Optional) X-MainAPI-Password: <given password>
  • (Optional) X-MainAPI-Senderid: <registered masking>
  • Accept: application/json
  • Content-Type: application/x-www-form-urlencoded
  • Authorization: Bearer <access token>
  • msisdn=<phone number>
  • content=<message to send>
  Please login to try this API.

MissCall OTP SDK


Misscall OTP API is our API that provides the delivery service of OTP or One Time Password, through Misscall. You can use this API to provide OTP authentication method through Misscall to your users. Your user will receive a Misscall with OTP in the last Number, he/she then enter this OTP on your application to authenticate through our OTP validation. The OTP generation is following the rule of RFC 6238 algorithm. The OTP has validity period that you can set, i.e. how long before the OTP expires, so your user should authenticate the OTP within the validity period.

Getting started

Configure Repository Gradle

Configure repository gradle by following this:

allprojects {
    repositories {
        maven {
            url "https://dl.bintray.com/mainapi/SDK"


Include the dependency in module gradle :

dependencies {
    implementation 'net.mainapi.sdk:core:1.0.0@aar'
    implementation 'net.mainapi.sdk:misscallotp:0.0.1@aar'


Define base URL, Key, and Secret using MainApiConfig, in your Application class in the onCreate() method.

public void onCreate() {
    MainApiConfig.initDefault(new MainApiConfig
        .setKeyAndSecret("YOUR_KEY", "YOUR_SECRET")

Note: Key and Secret are obtained from MainAPI website in user account information on individual application page .


Send OTP Key

Use this to send OTP key via Misscall. To include the Phone Number on your content, use {{PHONE_NUMBER}}, see request example below:

MisscallOTP misscallOtp = new MisscallOTP(Activity.this);
Request.MisscallOTP otp = new Request().new MisscallOTP();
otp.setUser("Your Phone Number is {{PHONE_NUMBER}}");

misscallOtp.sendMisscallOTP("{{UNIQUE_ID}}", otp, new MisscallOTPCallbacks() {
    public void onSuccess(@NonNull MisscallOTP otp) {
        Log.d("This Prefix Number from Our Misscall", otp.getPrefix());

    public void onFailure(@NonNull Throwable t) {


    public void onError(@NonNull JSONObject jsonError) {


Note: As you can see above, UNIQUE_ID is a path parameter called otpID, it is used as an identification ID, it should be filled with UUID. You can generate UUID from Core Module inside Helper

Verify OTP Key

In order to verify OTP key validity, you must use the same otpID parameter that was used to send the OTP key.
Fill otpstr with generated OTP key that need to be verified
See request example below:

MisscallOTtp misscallOtp = new MisscallOtp(Activity.this);
Request.VerifyMisscallOTP verificationOTP = new Request().new VerifyMisscallOTP();

misscallOtp.verifyMiscallOTP({{OTP_ID}}, verificationOTP, new VerifyMisscallOPTCallbacks() {
    public void onSuccess(@NonNull Boolean result) {

    public void onFailure(@NonNull Throwable t) {


    public void onError(@NonNull JSONObject jsonError) {


Note: You can use our Background Process sample to get Misscall Phone Number inside Core Module with Class Name Service Receiver. If Verification Success, it will not return anything. You can get a Boolean from Callback to check Verification. You must remove recent Call History after Verify OTP. In Core Module you can use function removeContactsLogFromPhoneLogs to delete Our Miscall Phone Number

  Please login to use this API.


Free 5 Calls
Free 5 calls a day


100 Calls
100 calls as you grow


1000 Calls
1000 calls as you grow


5000 Calls
5000 calls as you grow


10000 Calls
10000 calls as you grow