WhatsApp
logo fazpass
Home » Developer
product demo for developers
Integration Walkthrough for Developers

Experience Hands-On Exploration of Our Dashboard

15-Minute Connections for Multiple Integrations

Switch and Connect with Multiple OTP Providers on One Dashboard. No Downtime. No Restrictions. Under 15 Minutes to Any Channel.
one apiAuto-Generate OTP Code
Generate OTP Codes via Our Dashboard, Save Server Resources, and Help You Save More Time While Speeding Up the Development Process.
easy switch dashEasy Switch Channel via Dashboard
Simplify Channel and Provider Switching with Effortless Dashboard Control, No Technical Development Needed
smart reportSmart Report & Analysis
Get the Best Results from Any Channel with Reliable Verification Rate Data, and Effortlessly Monitor Your Usage and Delivery Rate.
curl
cURL
php
PHP
nodejs
NodeJs
java
Java
python
Phython
ruby
Ruby
End Point
https://api.fazpass.com/v1/otp/request
Merchant Key
You can see in our dashboard via Setting Menu -> Merchant Key. If you dont have Fazpass account please register here.
Gateway Key
Create your gateway key in Proxy Menu for connecting to specific channel & provider. See in our dashboard Proxy Menu -> Show Key Gateway -> Copy.
Code Example

curl -X POST \
-H "Authorization: Bearer YOUR_MERCHANT_KEY" \
-H "Content-Type: application/json" \
-d '{
     "phone": "YOUR_PHONE_NUMBER",
     "gateway_key": "YOUR_GATEWAY_KEY"
    }' \
https://api.fazpass.com/v1/otp/request

End Point
https://api.fazpass.com/v1/otp/request
Merchant Key
You can see in our dashboard via Setting Menu -> Merchant Key. If you dont have Fazpass account please register here.
Gateway Key
Create your gateway key in Proxy Menu for connecting to specific channel & provider. See in our dashboard Proxy Menu -> Show Key Gateway -> Copy.
Code Example

function sendOTP($YOUR_PHONE_NUMBER) {
    $data = json_encode([
        "phone" => $YOUR_PHONE_NUMBER,
        "gateway_key" => "YOUR_GATEWAY_KEY"
    ]);

    $ch = curl_init('https://api.fazpass.com/v1/otp/request');
    curl_setopt_array($ch, [
        CURLOPT_POST => 1,
        CURLOPT_POSTFIELDS => $data,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer YOUR_MERCHANT_KEY',
            'Content-Type: application/json'
        ],
        CURLOPT_RETURNTRANSFER => true
    ]);

    $response = curl_exec($ch);
    curl_close($ch);

    $result = json_decode($response, true);

    if ($result['status'] == true) {
        return 'OTP sent successfully!';
    } else {
        return 'Error: ' . ($result['message'] ?? 
		'Something went wrong while requesting OTP.');
    }
}

// Example usage with phone number
$YOUR_PHONE_NUMBER = 'YOUR_PHONE_NUMBER';
$response = sendOTP($YOUR_PHONE_NUMBER);
echo $response;

End Point
https://api.fazpass.com/v1/otp/request
Merchant Key
You can see in our dashboard via Setting Menu -> Merchant Key. If you dont have Fazpass account please register here.
Gateway Key
Create your gateway key in Proxy Menu for connecting to specific channel & provider. See in our dashboard Proxy Menu -> Show Key Gateway -> Copy.
Code Example

const axios = require('axios');

async function sendOTP(YOUR_PHONE_NUMBER) {
  const data = {
    phone: YOUR_PHONE_NUMBER,
    gateway_key: 'YOUR_GATEWAY_KEY'
  };

  try {
    const response = await 
	axios.post('https://api.fazpass.com/v1/otp/request', 
	data, {
      headers: {
        'Authorization': 'Bearer YOUR_MERCHANT_KEY',
        'Content-Type': 'application/json'
      }
    });

    if (response.data.status == true) {
      return 'OTP sent successfully!';
    } else {
      return 'Error: ' + (response.data.message || 
	  'Something went wrong while requesting OTP.');
    }
  } catch (error) {
    return 'Error: ' + error.message;
  }
}

// Example usage with phone number
const YOUR_PHONE_NUMBER = 'YOUR_PHONE_NUMBER';
sendOTP(YOUR_PHONE_NUMBER).then((response) => 
console.log(response)).catch((error) => console.error(error));

End Point
https://api.fazpass.com/v1/otp/request
Merchant Key
You can see in our dashboard via Setting Menu -> Merchant Key. If you dont have Fazpass account please register here.
Gateway Key
Create your gateway key in Proxy Menu for connecting to specific channel & provider. See in our dashboard Proxy Menu -> Show Key Gateway -> Copy.
Code Example

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class SendOTPJava {
    public static void main(String[] args) {
        String apiUrl = "https://api.fazpass.com/v1/otp/request";
        String token = "YOUR_MERCHANT_KEY";
        String phone = "YOUR_PHONE_NUMBER";
        String gatewayKey = "YOUR_GATEWAY_KEY";
        
        String jsonBody = "{ \"phone\": \"" + phone + "\", 
		\"gateway_key\": \"" + gatewayKey + "\" }";

        try {
        URL url = new URL(apiUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            
        // Set request method to POST
        connection.setRequestMethod("POST");
            
        // Set headers
        connection.setRequestProperty("Authorization", "Bearer " + token);
        connection.setRequestProperty("Content-Type", "application/json");

        // Enable writing to the URL connection
        connection.setDoOutput(true);
            
        // Write data to the connection
        try (DataOutputStream outputStream = 
		new DataOutputStream(connection.getOutputStream())) {
                outputStream.writeBytes(jsonBody);
                outputStream.flush();
            }

        // Get response code
        int responseCode = connection.getResponseCode();

        // Read response
        try (BufferedReader reader = 
new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
                StringBuilder response = new StringBuilder();
                String line;
                while ((line = reader.readLine()) != null) {
                    response.append(line);
                }
                
                if (responseCode == 200) {
                    System.out.println("OTP sent successfully!");
                } else {
                    System.out.println("Error: " + response.toString());
                }
            }

            // Close the connection
            connection.disconnect();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

End Point
https://api.fazpass.com/v1/otp/request
Merchant Key
You can see in our dashboard via Setting Menu -> Merchant Key. If you dont have Fazpass account please register here.
Gateway Key
Create your gateway key in Proxy Menu for connecting to specific channel & provider. See in our dashboard Proxy Menu -> Show Key Gateway -> Copy.
Code Example

import requests
import json

def sendOTP(YOUR_PHONE_NUMBER):
    data = {
        "phone": YOUR_PHONE_NUMBER,
        "gateway_key": "YOUR_GATEWAY_KEY"
    }

    headers = {
        'Authorization': 'Bearer YOUR_MERCHANT_KEY',
        'Content-Type': 'application/json'
    }

    try:
        response = requests.post('https://api.fazpass.com/v1/otp/request', 
		data=json.dumps(data), headers=headers)
        result = response.json()

        if result['status'] == true:
            return 'OTP sent successfully!'
        else:
            return 'Error: ' + (result['message'] if 'message' in result else 'Something went wrong while requesting OTP.')
    except requests.exceptions.RequestException as e:
        return 'Error: ' + str(e)

# Example usage with phone number
YOUR_PHONE_NUMBER = 'YOUR_PHONE_NUMBER'
response = sendOTP(YOUR_PHONE_NUMBER)
print(response)

End Point
https://api.fazpass.com/v1/otp/request
Merchant Key
You can see in our dashboard via Setting Menu -> Merchant Key. If you dont have Fazpass account please register here.
Gateway Key
Create your gateway key in Proxy Menu for connecting to specific channel & provider. See in our dashboard Proxy Menu -> Show Key Gateway -> Copy.
Code Example

require 'httparty'
require 'json'

def send_otp(YOUR_PHONE_NUMBER)
  endpoint = 'https://api.fazpass.com/v1/otp/request'
  headers = {
    'Authorization' => 'Bearer YOUR_MERCHANT_KEY',
    'Content-Type' => 'application/json'
  }
  data = {
    phone: YOUR_PHONE_NUMBER,
    gateway_key: 'YOUR_GATEWAY_KEY'
  }.to_json

  response = HTTParty.post(endpoint, headers: headers, body: data)

  if response.code == 200 && response.parsed_response['status'] == true
    'OTP sent successfully!'
  else
    "Error: #{response.parsed_response['message'] || 'Something went wrong while requesting OTP.'}"
  end
end

# Example usage with phone number
YOUR_PHONE_NUMBER = 'YOUR_PHONE_NUMBER'
response = send_otp(YOUR_PHONE_NUMBER)
puts response

product demo cta

Want to Kickstart Your
Integration Development?

Make your tasks easier and speed up development with us. Enjoy more coffee, less hassle. Join us!
Read Documentation

Reach Out to Fazpass Team

Tell us a little about yourself and we'll connect you with Fazpass team who can share more about the product and answer any questions you have.









    For information about how Fazpass handles your personal data, please see our privacy policy.
    Trusted by 300+ Startups
    & Large Companies!
    300 startups

    Frequently Asked Question

    What is Fazpass?

    Fazpass is a secure authentication and access management solution that uses One-Time Passwords (OTP) to enhance the security of user accounts and transactions.

    Why should I integrate Fazpass OTP into my application?

    Integrating Fazpass OTP provides an extra layer of security for user authentication, reducing the risk of unauthorized access to user accounts and sensitive data.

    What APIs does Fazpass offer for OTP integration?

    Fazpass offers the following APIs for OTP integration:

    • OTP Generation API: This API allows you to generate time-based OTPs for users.
    • OTP Verification API: This API enables you to verify OTPs entered by users during the authentication process.

    How do I get started with API integration?

    To get started with API integration, follow these steps:

    • Sign up for a Fazpass API account. Obtain your API keys and credentials from the Fazpass dashboard.
    • Review the API documentation for detailed integration instructions. doc.fazpass.com

    What programming languages are supported for integration?

    Fazpass APIs support a wide range of programming languages, including but not limited to: Python, Java, JavaScript (Node.js), Ruby, PHP, and more.

    How do I generate OTPs for my users?

    To generate OTPs for your users, make a POST request to the OTP Generation API with the required parameters.

    How do I verify OTPs during user authentication?

    To verify OTPs during user authentication, make a POST request to the OTP Verification API with the user's entered OTP and their unique identifier. The API will respond with the verification status.

    Can I customize the appearance of OTP messages?

    Yes, you can customize the OTP messages from fazpass dashboard. Refer to the API documentation for instructions on how to customize the message content and formatting.

    What resources are available for developers?

    Fazpass provides comprehensive API documentation, code examples, and a developer community forum to help you with your integration journey.
    fazpass logo
    We are a Multi-Factor Authentication Solution Service Provider that helps enterprises engage with Omnichannel and Multi-Provider with just Single API Integration.
    Jl. Delima I No. 10 Kav. DKI Meruya Sel., Kec. Kembangan, Kota Jakarta Barat Daerah Khusus Ibukota Jakarta 11610
    ISO 27001FIDO_Alliance_Logo-1 1
    crossmenuchevron-downchevron-right