5-Minute Quick Start Guide

Integrate document OCR extractions into your web or mobile software in three simple steps.

1

Get your API Key credential

Log into the developer console and generate a new Secret API Key from your API Keys panel. Keep your secret token hidden in environment files.

SRA_SECRET_API_KEY=sra_live_8392kasd812j31has0a
2

Hit the Document API endpoint

Send a binary multipart POST request carrying your document image file, specifying the authentication key inside the authorization header headers.

curl -X POST https://api.sasira.id/v1/ocr/ktp \
  -H "Authorization: Bearer sra_live_8392kasd812j31has0a" \
  -F "image=@/path/to/ktp.jpg"
3

Register for Webhook delivery callbacks

Set up target callback URLs inside the Webhook panel. SaSiRa will trigger automated POST deliveries to your server the moment document extraction completes.

// Express.js Route Handler for SaSiRa Webhook callbacks
app.post('/sasira-callbacks', (req, res) => {
  const event = req.body;
  if (event.type === 'ktp.completed') {
    const data = event.data;
    console.log(`NIK extracted: ${data.nik}`);
  }
  res.sendStatus(200);
});