Ask our Experts
Didn't find what you are looking for? Ask our experts!
Share Your Feedback – Help Us Improve Search on Community! Please take a few minutes to participate in our Search Feedback Survey. Your insights will help us deliver the results you need faster and more accurately. Click here to take the survey
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-11-11 08:31 AM
Hello,
I am trying to access the netbotz api with python script. I am keep getting 403 Forbidden error or 400 client error even after passing credentials for authorization. However, the url works fine in browser after logging to the device, Could anyone please share their experience on how to access the api?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-11-14 09:23 AM
Hello @n_nagra, The NetBotz 750/755 RestAPI Login uses sessions with cookies for authentication. I have attached a python file (extension is a .txt to be able to post for security reasons) that will hopefully help you understand the authentication mechanism through the use of the the cookies.
You will need to do the following:
- Edit line 211 and add the IPv4 address of the NetBotz Appliance
- Edit line 214 and add the password for the NetBotz Appliance
- Create a python 3.13 environment with the following python dependences
- requests==2.32.4
- This is usually accomplished by running "pip install requests" in a Python workspace
The file shows how to log into a NetBotz 750/755 appliance using Python. The function that does this is called nb_login. The NetBotz RestAPI authentication mechanism uses Cookies so you will want to pay special attention to:
returnMap['JSESSIONID'] = response.cookies.get('JSESSIONID')
returnMap['XSRF-TOKEN'] = response.cookies.get('XSRF-TOKEN')
The dict returned by the nb_login method contains cookies. The nb_get method shows how those are added to subsequent request.
Regards,
Cory
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-11-14 09:23 AM
Hello @n_nagra, The NetBotz 750/755 RestAPI Login uses sessions with cookies for authentication. I have attached a python file (extension is a .txt to be able to post for security reasons) that will hopefully help you understand the authentication mechanism through the use of the the cookies.
You will need to do the following:
- Edit line 211 and add the IPv4 address of the NetBotz Appliance
- Edit line 214 and add the password for the NetBotz Appliance
- Create a python 3.13 environment with the following python dependences
- requests==2.32.4
- This is usually accomplished by running "pip install requests" in a Python workspace
The file shows how to log into a NetBotz 750/755 appliance using Python. The function that does this is called nb_login. The NetBotz RestAPI authentication mechanism uses Cookies so you will want to pay special attention to:
returnMap['JSESSIONID'] = response.cookies.get('JSESSIONID')
returnMap['XSRF-TOKEN'] = response.cookies.get('XSRF-TOKEN')
The dict returned by the nb_login method contains cookies. The nb_get method shows how those are added to subsequent request.
Regards,
Cory
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-11-14 09:32 AM
Thank you for your help.
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.