Skip to main content
A Go SDK for integrating with Eka Care’s healthcare APIs, including ABDM (Ayushman Bharat Digital Mission) services.

Overview

Use this SDK to authenticate with Eka Care, call ABDM services, and build backend integrations in Go with minimal boilerplate.

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

Available services

Once authenticated, you can access:
  • ABDM services: client.ABDM.Login(), client.ABDM.Registration(), client.ABDM.Profile()
  • More services will be added as they become available

Troubleshooting

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

Examples and resources