Professional Documents
Culture Documents
(Confidential)
(EPFO API: NoGUI)
CONTENTS:
Request
Method https://api-oauth2.digiverifier.com/epfo/generate-post/
POST
Type Params Values
POST client_id String
client_secret String
import pandas as pd
import requests
import response
response=requests.post("https://api-oauth2.digiverifier.com/epfo/generate-
post/",headers={'Content-Type':'application/json'},
json={'client_id':'af5cc093-26d6-424d-8825-
582e26e1a10','client_secret':'31VegAwO2iLr1wBeR72mTEvn'})
token=pd.read_json(response.text)
print('Access token is generated:',token['message'][0])
print(response.json())
Response
Request
Method https://api-oauth2.digiverifier.com/epfo/transaction-get/
GET
response = requests.get("https://api-oauth2.digiverifier.com/epfo/transaction-get/",
headers={'accept':'application/json','bearer':token['message'][0]})
tid=response.json()
Response
Method https://api-
oauth2.digiverifier.com/epfo/submit-
post/?txnid=<transactionid>
POST
Type Params Values
POST epfoemployer-user string
epfoemployer-pwd String
employee-uan String
Response
3. GET report:
It takes around 60 seconds to complete report generation at the backend after the
previous step of submitting credentials. A simple get request along with access token and
transaction id information can be used to obtain the report. We can obtain the report in
‘json’ format by using the URL. See python sample code below to obtain the report.
By default, the transaction id and json report associated with it expires in 20 minutes.
Request
respon=requests.get('https://api-oauth2.digiverifier.com/epfo/report-get/?
txnid='+str(tid['message'])+'&format=json',
headers={'accept':'application/json','Bearer':token['message'][0]})
respon.text
respon=requests.get('https://api-oauth2.digiverifier.com/epfo/report-get/?
txnid='+str(tid['message'])+'&format=json',
headers={'accept':'application/json','Bearer':token['message'][0]})
respon.text
Response
>>> {'code': 'success', 'message': [{'uan': 1010760729, 'name': 'MOHAN',
'company': ' LIMITED', 'doj': '25/04/2018', 'doe': 'NOT_AVAILABLE'}, {'uan':
1010760, 'name': 'MOHAN', 'company': ' CONSULTING INDIA PVTLTD', 'doj':
'27/02/2017', 'doe': '28/02/2018'}], 'success': True}
SAMPLE PYTHON CODE(GET REPORT IN pdf FORMAT):
import base64
from base64 import b64decode
import codecs
response=requests.get(check+'/epfo/report-get-pdf/?txnid='+str(tid['message'])
+'&format=json',
headers={'accept':'application/json','Bearer':token['message'][0]})
print(response.text)
decoded_string = base64.b64decode(ascii(response.text))
with open('Binary_string_checking.pdf', 'wb') as f:
f.write(decoded_string)
with open('report.pdf','wb') as f:
f.write(response.content)
Glossary
Conventions
Client-Client application.
Status-HTTP status code of response.
All response are in JSON format.
Status Codes
All status codes are standard HTTP status codes. The below ones are used in this API.
2XX-Successofsomekind
4XX-Erroroccurredinclient’spart
5XX-Erroroccurredinserver’spart