Trying to hit the Service Now API using basic auth #1553
Replies: 2 comments 3 replies
|
Can you provide examples of the differences you're seeing? Of course with sensitive information redacted, but it'll be a lot easier to help with your example httpx code that doesn't work, and the HTTP session from Postman that does. |
|
Very simple request out to Service Now. I used Postman first to model out the request and ensure I have all my headers and params correct. Once I was able to get the data I wanted in postman I then went to python. The only real difference I can tell between the two is the base64 encoded authorization header. When I execute the _build_auth_header function in the python interpreter the token I get back is different than the token that is generated in postman. When I hardcode the authorization header with the token from postman everything works as expected. |
Uh oh!
There was an error while loading. Please reload this page.
Hello All,
I'm having issues hitting the service now API using httpx basic auth. I've tested API connectivity with Postman and I can connect with no issues. What I notice is the Authorization header that I get from postman is dramatically different than the header I get with httpx or python in general. I'm a bit perplexed as to why this is as the basic auth appears pretty simple.
I must be missing something, some assistance pointing me in the right direction would be much appreciated.
Thank you.
All reactions