All URIs are relative to https://healthidsbx.abdm.gov.in/api/v1
Method | HTTP request | Description |
---|---|---|
auth_aadhar_init | POST /auth/init | auth-aadhar-init |
confirm_with_aadhaar_otp | POST /auth/confirmWithAadhaarOtp | aadhar-otp-confirm |
create_health_id_with_pre_verified | POST /registration/aadhaar/createHealthIdWithPreVerified | Health ID creation |
generate_card_using_get | GET /account/getCard | Generate ABHA card in PDF format |
generate_mobile_otp | POST /registration/aadhaar/generateMobileOTP | Generate Mobile OTP |
generate_otp | POST /registration/aadhaar/generateOtp | Generate OTP |
generate_png_card_using_get | GET /account/getPngCard | Generate ABHA card PNG |
generate_svg_card_using_get | GET /account/getSvgCard | Generate ABHA card SVG |
get_account_information_using_get | GET /account/profile | Get account information. |
get_qr_code_using_get | GET /account/qrCode | Get Quick Response code in PNG format for this account. |
resend_auth_otp | POST /auth/resendAuthOTP | resend-auth-aadhar-init |
verify_mobile_otp | POST /registration/aadhaar/verifyMobileOTP | Verify Mobile OTP |
verify_otp | POST /registration/aadhaar/verifyOTP | Verify OTP |
GenerateOtp200Response auth_aadhar_init(auth_aadhar_init_request)
auth-aadhar-init
This endpoint Initiates Aadhar Authentication
import abha
from abha.models.auth_aadhar_init_request import AuthAadharInitRequest
from abha.models.generate_otp200_response import GenerateOtp200Response
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
auth_aadhar_init_request = abha.AuthAadharInitRequest() # AuthAadharInitRequest |
try:
# auth-aadhar-init
api_response = api_instance.auth_aadhar_init(auth_aadhar_init_request)
print("The response of DefaultApi->auth_aadhar_init:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->auth_aadhar_init: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
auth_aadhar_init_request | AuthAadharInitRequest |
Status code | Description | Response headers |
---|---|---|
200 | Transaction Id | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateOtp200Response confirm_with_aadhaar_otp(resend_auth_otp_request)
aadhar-otp-confirm
This endpoint Confirms Aadhar Authentication
import abha
from abha.models.generate_otp200_response import GenerateOtp200Response
from abha.models.resend_auth_otp_request import ResendAuthOTPRequest
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
resend_auth_otp_request = abha.ResendAuthOTPRequest() # ResendAuthOTPRequest |
try:
# aadhar-otp-confirm
api_response = api_instance.confirm_with_aadhaar_otp(resend_auth_otp_request)
print("The response of DefaultApi->confirm_with_aadhaar_otp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->confirm_with_aadhaar_otp: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
resend_auth_otp_request | ResendAuthOTPRequest |
Status code | Description | Response headers |
---|---|---|
200 | Transaction Id | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateHealthIdWithPreVerified200Response create_health_id_with_pre_verified(create_health_id_with_pre_verified_request)
Health ID creation
This endpoint Creates Health Id .
import abha
from abha.models.create_health_id_with_pre_verified200_response import CreateHealthIdWithPreVerified200Response
from abha.models.create_health_id_with_pre_verified_request import CreateHealthIdWithPreVerifiedRequest
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
create_health_id_with_pre_verified_request = abha.CreateHealthIdWithPreVerifiedRequest() # CreateHealthIdWithPreVerifiedRequest |
try:
# Health ID creation
api_response = api_instance.create_health_id_with_pre_verified(create_health_id_with_pre_verified_request)
print("The response of DefaultApi->create_health_id_with_pre_verified:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->create_health_id_with_pre_verified: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_health_id_with_pre_verified_request | CreateHealthIdWithPreVerifiedRequest |
CreateHealthIdWithPreVerified200Response
Status code | Description | Response headers |
---|---|---|
200 | Health Id Created successfully | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
generate_card_using_get(accept_language, x_token)
Generate ABHA card in PDF format
Explanation - Api Accepts Auth Token and then Returns Account Details for PDF format. Request Body - Required Responce - Api Accepts Auth Token and then Returns Account Details for PDF format. Returns Error for Unauthorized Auth Token.
import abha
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
accept_language = 'accept_language_example' # str | Access Token.
x_token = 'x_token_example' # str | Access Token.
try:
# Generate ABHA card in PDF format
api_instance.generate_card_using_get(accept_language, x_token)
except Exception as e:
print("Exception when calling DefaultApi->generate_card_using_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
accept_language | str | Access Token. | |
x_token | str | Access Token. |
void (empty response body)
Status code | Description | Response headers |
---|---|---|
200 | Return details in case of success | - |
400 | Bad request, check request before retrying | - |
401 | Unauthorized Access. | - |
403 | Forbidden | - |
404 | Not Found | - |
422 | Could not generate Card or Invalid Token | - |
500 | Downstream system(s) is down. Unhandled exceptions. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateOtp200Response generate_mobile_otp(generate_mobile_otp_request)
Generate Mobile OTP
This endpoint Generates OTP for Abha verification.
import abha
from abha.models.generate_mobile_otp_request import GenerateMobileOtpRequest
from abha.models.generate_otp200_response import GenerateOtp200Response
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
generate_mobile_otp_request = abha.GenerateMobileOtpRequest() # GenerateMobileOtpRequest |
try:
# Generate Mobile OTP
api_response = api_instance.generate_mobile_otp(generate_mobile_otp_request)
print("The response of DefaultApi->generate_mobile_otp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->generate_mobile_otp: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
generate_mobile_otp_request | GenerateMobileOtpRequest |
Status code | Description | Response headers |
---|---|---|
200 | OTP Generated successfully | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateOtp200Response generate_otp(generate_otp_request)
Generate OTP
This endpoint generates an OTP for Aadhaar number verification.
import abha
from abha.models.generate_otp200_response import GenerateOtp200Response
from abha.models.generate_otp_request import GenerateOtpRequest
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
generate_otp_request = abha.GenerateOtpRequest() # GenerateOtpRequest |
try:
# Generate OTP
api_response = api_instance.generate_otp(generate_otp_request)
print("The response of DefaultApi->generate_otp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->generate_otp: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
generate_otp_request | GenerateOtpRequest |
Status code | Description | Response headers |
---|---|---|
200 | OTP generated successfully | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GeneratePngCardUsingGET200Response generate_png_card_using_get(accept_language, x_token)
Generate ABHA card PNG
Explanation - Api Accepts Auth Token and then Returns Account Details for PNG format. Request Body - Required Responce - Api Accepts Auth Token and then Returns Account Details for PNG format. Returns Error for Unauthorized Auth Token.
import abha
from abha.models.generate_png_card_using_get200_response import GeneratePngCardUsingGET200Response
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
accept_language = 'accept_language_example' # str | Access Token.
x_token = 'x_token_example' # str | Access Token.
try:
# Generate ABHA card PNG
api_response = api_instance.generate_png_card_using_get(accept_language, x_token)
print("The response of DefaultApi->generate_png_card_using_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->generate_png_card_using_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
accept_language | str | Access Token. | |
x_token | str | Access Token. |
GeneratePngCardUsingGET200Response
Status code | Description | Response headers |
---|---|---|
200 | Return details in case of success | - |
400 | Bad request, check request before retrying | - |
401 | Unauthorized Access. | - |
403 | Forbidden | - |
404 | Not Found | - |
422 | Could not generate Card or Invalid Token | - |
500 | Downstream system(s) is down. Unhandled exceptions. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray generate_svg_card_using_get(accept_language, x_token)
Generate ABHA card SVG
Explanation - Api Accepts Auth Token and then Returns Account Details for SVG format. Request Body - Required Responce - Api Accepts Auth Token and then Returns Account Details for SVG format. Returns Error for Unauthorized Auth Token.
import abha
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
accept_language = 'accept_language_example' # str | Access Token.
x_token = 'x_token_example' # str | Access Token.
try:
# Generate ABHA card SVG
api_response = api_instance.generate_svg_card_using_get(accept_language, x_token)
print("The response of DefaultApi->generate_svg_card_using_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->generate_svg_card_using_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
accept_language | str | Access Token. | |
x_token | str | Access Token. |
bytearray
Status code | Description | Response headers |
---|---|---|
200 | Return details in case of success | - |
400 | Bad request, check request before retrying | - |
401 | Unauthorized Access. | - |
403 | Forbidden | - |
404 | Not Found | - |
422 | Could not generate Card or Invalid Token | - |
500 | Downstream system(s) is down. Unhandled exceptions. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAccountInformationUsingGET200Response get_account_information_using_get(accept_language, x_token)
Get account information.
Explanation - Api Accepts Auth Token and then Returns Account Details. Request Body - Required Responce - Api Accepts Auth Token and then Returns Account Details. Returns Error for Unauthorized Auth Token.
import abha
from abha.models.get_account_information_using_get200_response import GetAccountInformationUsingGET200Response
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
accept_language = 'accept_language_example' # str | Access Token.
x_token = 'x_token_example' # str | Access Token.
try:
# Get account information.
api_response = api_instance.get_account_information_using_get(accept_language, x_token)
print("The response of DefaultApi->get_account_information_using_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_account_information_using_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
accept_language | str | Access Token. | |
x_token | str | Access Token. |
GetAccountInformationUsingGET200Response
Status code | Description | Response headers |
---|---|---|
200 | Return Account details in case of success | - |
400 | Bad request, check request before retrying | - |
401 | Unauthorized Access. | - |
403 | Forbidden | - |
404 | Not Found | - |
422 | Could not Get account information or Invalid Token | - |
500 | Downstream system(s) is down. Unhandled exceptions. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_qr_code_using_get(accept_language, x_token)
Get Quick Response code in PNG format for this account.
Explanation - Api Accepts Auth Token and then returns Account Info for QR Code. Request Body - Required Responce - Api Accepts Auth Token and then returns Account Info for QR Code. Returns Error for Unauthorized Token.
import abha
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
accept_language = 'accept_language_example' # str | Access Token.
x_token = 'x_token_example' # str | Access Token.
try:
# Get Quick Response code in PNG format for this account.
api_response = api_instance.get_qr_code_using_get(accept_language, x_token)
print("The response of DefaultApi->get_qr_code_using_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_qr_code_using_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
accept_language | str | Access Token. | |
x_token | str | Access Token. |
bytearray
Status code | Description | Response headers |
---|---|---|
200 | Return QR Code in Byte Array Form in case of success | - |
400 | Bad request, check request before retrying | - |
401 | Unauthorized Access. | - |
403 | Forbidden | - |
404 | Not Found | - |
422 | Expired or Invalid Token | - |
500 | Downstream system(s) is down. Unhandled exceptions. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateOtp200Response resend_auth_otp(resend_auth_otp_request)
resend-auth-aadhar-init
This endpoint Initiates Resends Aadhar Authentication
import abha
from abha.models.generate_otp200_response import GenerateOtp200Response
from abha.models.resend_auth_otp_request import ResendAuthOTPRequest
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
resend_auth_otp_request = abha.ResendAuthOTPRequest() # ResendAuthOTPRequest |
try:
# resend-auth-aadhar-init
api_response = api_instance.resend_auth_otp(resend_auth_otp_request)
print("The response of DefaultApi->resend_auth_otp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->resend_auth_otp: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
resend_auth_otp_request | ResendAuthOTPRequest |
Status code | Description | Response headers |
---|---|---|
200 | Transaction Id | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateOtp200Response verify_mobile_otp(verify_otp_request)
Verify Mobile OTP
This endpoint Verfies OTP for Abha verification.
import abha
from abha.models.generate_otp200_response import GenerateOtp200Response
from abha.models.verify_otp_request import VerifyOtpRequest
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
verify_otp_request = abha.VerifyOtpRequest() # VerifyOtpRequest |
try:
# Verify Mobile OTP
api_response = api_instance.verify_mobile_otp(verify_otp_request)
print("The response of DefaultApi->verify_mobile_otp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->verify_mobile_otp: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
verify_otp_request | VerifyOtpRequest |
Status code | Description | Response headers |
---|---|---|
200 | OTP Verified successfully | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateOtp200Response verify_otp(verify_otp_request)
Verify OTP
This endpoint Verfies OTP for Aadhaar number verification.
import abha
from abha.models.generate_otp200_response import GenerateOtp200Response
from abha.models.verify_otp_request import VerifyOtpRequest
from abha.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://healthidsbx.abdm.gov.in/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = abha.Configuration(
host = "https://healthidsbx.abdm.gov.in/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = abha.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with abha.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = abha.DefaultApi(api_client)
verify_otp_request = abha.VerifyOtpRequest() # VerifyOtpRequest |
try:
# Verify OTP
api_response = api_instance.verify_otp(verify_otp_request)
print("The response of DefaultApi->verify_otp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->verify_otp: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
verify_otp_request | VerifyOtpRequest |
Status code | Description | Response headers |
---|---|---|
200 | OTP Validated successfully | - |
400 | Bad request (e.g., missing or invalid Aadhaar number) | - |
401 | Unauthorized (invalid or missing bearer token) | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]