Skip to content

How to add an ONVIF user? #182

Closed Answered by vivekatoffice
zipswich asked this question in VAPIX
Discussion options

You must be logged in to vote

Hi @zipswich ,
Please find details and the snippet in Python below:

Axis OS portal reference

SOAP_API_Call_Create_ONVIF_USER_Python.py

import requests
from requests.auth import HTTPDigestAuth

url = "http://192.168.2.13/vapix/services"
payload =""

# open the input xml file and read
# data in form of python dictionary
# using xmltodict module
with open("test.xml") as xml_file:
     
    payload = xml_file.read()
# headers
headers = {
    'Content-Type': 'text/xml; charset=utf-8'
}
# POST request
#response = requests.request("POST", url, headers=headers, data=payload)
response = requests.request('POST',url,data=payload, auth=HTTPDigestAuth('root','pass'), verify=False) 
# prints the response

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by zipswich
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
VAPIX
Labels
None yet
3 participants