Python Forum
get JSON string from URL with Windows credentials
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get JSON string from URL with Windows credentials
#1
I can paste the url into the browser address and get the JSON text; my Windows credentials being used by default. However, my current code produces an error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate

import requests
from requests_negotiate_sspi import HttpNegotiateAuth

json_file = 'test.json'
url='https://auth.data.co.com/report_auth.php?r=/Region/123/Dept/api/open/form/query/_32wmk?x-filterData=recordID,title,date'

response = requests.get(url, auth = HttpNegotiateAuth())
data = response.content
with open(json_file, 'wb') as f:
    f.write(data)
Tried requests.post, but same error. If there is a PowerShell method, I'll try that.

Thank you
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Parse Nested JSON String in Python mmm07 4 2,721 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Cannot find py credentials file standenman 5 3,226 Feb-25-2023, 08:30 PM
Last Post: Jeff900
  string indices must be integers when parsing Json ilknurg 3 9,974 Mar-10-2022, 11:02 AM
Last Post: DeaD_EyE
Question convert unlabeled list of tuples to json (string) masterAndreas 4 9,163 Apr-27-2021, 10:35 AM
Last Post: masterAndreas
  python application and credentials safety concern aster 4 4,575 Mar-06-2021, 06:51 PM
Last Post: snippsat
  Using python to execute app or cmd that requires admin credentials thewolf 0 2,694 Mar-05-2021, 08:15 PM
Last Post: thewolf
  Convert string to JSON using a for loop PG_Breizh 3 3,723 Jan-08-2021, 06:10 PM
Last Post: PG_Breizh
  httplib2 - how to see credentials added by add_credentials? MSV 2 2,904 Aug-05-2020, 12:24 PM
Last Post: MSV
  Python Parameter inside Json file treated as String dhiliptcs 0 2,437 Dec-10-2019, 07:28 PM
Last Post: dhiliptcs
  Strange Characters in JSON returned string fioranosnake 4 7,012 Dec-02-2019, 07:25 PM
Last Post: fioranosnake

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020