Created
March 24, 2023 05:09
-
-
Save bipinkrish/b70257189deeefa04cdfeee323334398 to your computer and use it in GitHub Desktop.
Check Status of our Aadhaar Pan Link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
aadhaar = input("Aadhaar Number: ") | |
pan = input("Pan Number: ") | |
json_data = { | |
'aadhaarNumber': aadhaar, | |
'pan': pan, | |
'preLoginFlag': 'Y', | |
'serviceName': 'linkAadhaarPreLoginService', | |
} | |
response = requests.post( | |
'https://eportal.incometax.gov.in/iec/servicesapi/getEntity', | |
json=json_data, | |
).json()['messages'][0] | |
if response["type"] == "ERROR": print("ERROR: ",end="") | |
print(response["desc"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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