🔗 DigiPin API Integration Guide

This guide explains how developers can easily integrate the DigiPin API into websites, mobile applications, or backend systems to generate and decode DigiPins using geographic coordinates.

📘 Integration Overview

DigiPin API works through secure REST endpoints. You send latitude and longitude values to generate a DigiPin or provide a DigiPin to decode it back into coordinates. All requests require an API key for authentication.

✅ Step 1: Obtain API Key

Request your DigiPin API key via WhatsApp. The free trial is valid for 30 days from the date of activation.

🟢 Request API Key

🔐 Step 2: Authentication

Include your API key in the request header for every API call.

Headers:
x-api-key: YOUR_API_KEY
Content-Type: application/json
    

📍 Step 3: Generate DigiPin

Use this endpoint to convert latitude and longitude into a DigiPin.

POST https://digipin.sostabazar.in/api/generate.php

Body:
{
  "latitude": 28.613939,
  "longitude": 77.209023
}
    

Response:

{
  "digipin": "39J-438-TJ9F"
}
    

🧭 Step 4: Decode DigiPin

Decode a DigiPin back into geographic coordinates.

POST https://digipin.sostabazar.in/api/decode.php

Body:
{
  "digipin": "39J-438-TJ9F"
}
    

Response:

{
  "latitude": 28.613935,
  "longitude": 77.209032
}
    

🚀 Integration Use Cases

💡 Best Practices

❗ Disclaimer

DigiPin is based on the open-source DIGIPIN framework by India Post. This platform is independently developed and is not affiliated with India Post or the Government of India.