Setu DigiLocker API client.
Fetch Aadhaar, driving licences, mark sheets, and more from GoI-certified issuing authorities with user consent.
Setu docs: https://docs.setu.co/data/kyc (DigiLocker section)
Summary
Functions
Initiates a DigiLocker consent session.
Fetches a specific document type from an authorised session.
Retrieves the current state of a DigiLocker session.
Functions
@spec create_session(SetuClient.Config.t(), map()) :: {:ok, map()} | {:error, SetuClient.Error.t()}
Initiates a DigiLocker consent session.
Redirect the customer to the returned consentUrl.
Required params
:redirect_url
POST /api/digilocker/session
@spec get_document(SetuClient.Config.t(), String.t(), String.t()) :: {:ok, map()} | {:error, SetuClient.Error.t()}
Fetches a specific document type from an authorised session.
GET /api/digilocker/session/:id/documents/:type
@spec get_session(SetuClient.Config.t(), String.t()) :: {:ok, map()} | {:error, SetuClient.Error.t()}
Retrieves the current state of a DigiLocker session.
GET /api/digilocker/session/:id