Getting random Unauthorized error

sanvit

New member
Joined
May 30, 2022
Messages
2
Hello!

I am having a weird issue when using DA's API with basic auth.

I'm 100% certain the credentials are correct, however I'm getting "Unauthorized" error on every even requests, while the API works fine on every odd requests.

I'll put a screenshot of my current code, as well as the error I'm getting when the "Unauthorized" error happens. If anyone experienced this issue, or knows a fix for it, any input will be highly appreciated.

By the way, I'm using login keys, but this also happens on user password as well.

Thanks!

da_error_code.png

da_error_screenshot.png

da_error_postman.png
 
OK, so I found the issue.

It seems like when you send both the session cookie and the authentication credentials, DA will clear the session and log you out.
I was able to fix it by disabling cookie on requests.session.
 
Back
Top