How do I use invoke-webrequest with basic authentication header in PowerShell? or What's the correct

14 Replies, 1167 Views

Yo, random thought—are you sure the server even accepts basic auth? Some APIs force OAuth or tokens now. Check the docs!

If it *is* basic auth, your code looks right. Maybe the server’s case-sensitive with the header key? Try "authorization" lowercase.

Also, Fiddler or Wireshark can help see the raw request. Sometimes the issue isn’t even on your end.

Messages In This Thread



Users browsing this thread: 1 Guest(s)