Skip to main content

Prerequisites

  • Go 1.24+ (matches the SDK’s go.mod)
  • Eka Care developer account and credentials (client_id and client_secret)

Installation

Install a specific version (recommended for reproducible builds):

Authentication and Setup

The SDK supports configuration via environment variables (recommended) or explicit options in code. Set the following variables in your environment or a .env file:
Then initialize the client from environment variables:

Quickstart

Authenticate and call an ABDM API (login init via PHR address):

Configuration reference

  • EKA_CLIENT_ID: Client ID from the developer portal (required)
  • EKA_CLIENT_SECRET: Client secret from the developer portal (required)
  • EKA_ENVIRONMENT: production or development (required)
Configuration priority (highest to lowest):
  • Environment variables
  • Explicit options via WithXxx() functions
  • Built-in defaults

Troubleshooting

Typical auth/config errors when calling client.Login(ctx):

Examples and resources