Skip to main content

Session Token Works with Postman but not with Python Requests

Planned

Comments

3 comments

  • Andrey Terentyev
    • Network Optix team

    Hello,

    These redirects in pythons should be processed slightly different than just setting allow_redirects=True.

    Please see a code example in our repo on GitHub

    https://github.com/networkoptix/nx_open_integrations/blob/master/python/examples/common/server_api.py

    0
  • Aashish Dhakal

    Thanks for your quick reply, I tried that already. That's the case when you receive temporary redirect status codes in the response. This is not the case, the requests throw 401 directly, which doesn't even enter the redirect handling condition. 

    0
  • Andrey Terentyev
    • Network Optix team

    Hi,

    HTTP error 401 means Unauthorized. Please, check that credentials you're using in your python script are valid and the authentication scheme you're using in python script is the same set for the account in VMS.

    0

Please sign in to leave a comment.