Skip to content

Instantly share code, notes, and snippets.

@bipinkrish
Created March 24, 2023 05:09
Show Gist options
  • Save bipinkrish/b70257189deeefa04cdfeee323334398 to your computer and use it in GitHub Desktop.
Save bipinkrish/b70257189deeefa04cdfeee323334398 to your computer and use it in GitHub Desktop.
Check Status of our Aadhaar Pan Link
import urllib.request
import json
aadhaar = input("Aadhaar Number: ")
pan = input("Pan Number: ")
json_data = {
'aadhaarNumber': aadhaar,
'pan': pan,
'preLoginFlag': 'Y',
'serviceName': 'linkAadhaarPreLoginService',
}
data = json.dumps(json_data).encode('utf-8')
req = urllib.request.Request(url='https://eportal.incometax.gov.in/iec/servicesapi/getEntity', data=data, headers={'Content-Type': 'application/json'})
with urllib.request.urlopen(req) as f: response = json.loads(f.read().decode('utf-8'))['messages'][0]
if response["type"] == "ERROR": print("ERROR: ", end="")
print(response["desc"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment