Try ERPNext Buy Support Partners Foundation

Push-biometric-erpnext

Hi there , i am new to erpnext . i’m trying to push biometric erpnext for ( poll for Bio-metric Attendance and push to ERPNext via API) . follow this tutorial

Step !: Install python3.7 and git
2. Do pip install requests
3.Clone pyzk library using git clone https://github.com/karthikeyan5/pyzk
4. Clone this repository using git clone https://github.com/karthikeyan5/push-biometric-erpnext
5. Setup local_config.py from local_config.py.template file
6. Run this script using python push_to_erpnext.py

i have already successfully done 4 steps but in step 5 , i need erpnext api key & api secrets .
but i am unable to findout these keys. plz help me to finding out these keys. !

2 Likes

Hi @aamunim

For every user you can generate an api-key and api-secret which together form a token.

api-key: identifies the user.
api-secret: validates the request.
Api-key and api-secret can be generated from the web interface, from the command line or by remote procedure call (RPC):

RPC: /api/method/frappe.core.doctype.user.user.generate_keys?user=“user_name”
Command: bench execute frappe.core.doctype.user.user.generate_keys --args [‘user_name’]
Web: User -> Api Access -> Generate Keys

Note:

  • You need to create a User account on ERPNext (or an existing user with appropriate permissions) for this purpose
  • Just scroll towards the bottom of the User form and you’ll find the section called ‘API Access’
  • Api key cannot be re-generated
  • Only users with system manager role can generate keys

Cheers!

4 Likes

Thanks for the steps. Can you let me know what is the brand and model of the biometric device you are using. Would like to test on ZK Teco machine as this is the easiest available brand in our area.

1 Like

would you tell me is it possible to Push biometric erpnext with this device

pyzk support most of the latest model of Biometric Machines

1 Like

If i may ask, where do you run steps 5 and 6? is it in your ERPNext instance? Next question tied to this is how do you configure a local device to a cloud-based instance? As is shown the screenshot above, the device IP is local and the instance is in the cloud, how do you then redirect the local traffic from the device to the cloud-based instance?

i have changed erpnext url to local later. but now face this problem in step 6
can uhelp me plz

?

@wale hope you don’t mind me tagging you. Any way you could point me to how to generate API key? I generated API secret successfully from the created user but when i try yo generate API key from terminal i get the API secret but no key.

UPDATE: API Key is only visible for logged-in user. Found it.

2 Likes

@flexy2ky, This short note which was recently added might help clarify your questions here… https://github.com/frappe/push-biometric-erpnext/wiki/A-Note-on-Biometric-Integration-in-ERPNext

1 Like

anyone if can help me for biometric integration witherpnext

My process was interrupted and now the attendance won’t come. New records will be synced but the records that didn’t sync from the last run won’t get into erpnext now. Is there a configuration I can change and maybe delete and re-sync all?