ERPNext API with Arduino


I’m working on developing a program for arduino to connect to ERPNext. I hope to use it to create all kinds of automation, Including handheld RFID readers and fingerprint scanners.

I’m getting stuck early on, I’m hoping someone here can help. I can send the request, and it logs me in, but so far I can’t access the header.

Here’s the code:

Here’s the response:

[HTTP] POST… code: 200
Header count: 5
system_user =
user_image =
user_id =
full_name =
sid =
Res 1 = {“home_page”:“/desk”,“message”:“Logged In”,“full_name”:“Feather Huzzah”}


This is an excerpt from our android smart panel project that is still in testing, running javascript. I looke like the JSON wants the headers to be a some key value pairs. I did not work on this code personally, so that’s the limit of the “help” I can provide. Good luck Chris.

            url: _this.baseUrl + "/api/method/login",
            jar: _this.cookieJar,
            body: formData,
            headers: {
                'Content-Length': contentLength,
                'Content-Type': 'application/x-www-form-urlencoded'

Maybe a little late but this may help you or others for that kind of project. Arduino - MySQL | Arduino Tutorial (

I’M working on sensors to track humidity and grain volume on a silo and push them on ERPNext and use Insight to create a dashboard with stats

1 Like