PHRETS icon indicating copy to clipboard operation
PHRETS copied to clipboard

401 authorization error

Open carenamaemanzano opened this issue 6 years ago • 3 comments

Hi @troydavisson ,

Your PHRETS is very awesome and helpful but got minor errors when trying to connect to https URL. I tested the url, password, username in retsmd and they are actually working per perfectly. But when I used it in PHRETS it gave me this error:

Uncaught GuzzleHttp\Exception\ClientException: Client error: GET https://bridge-rets.mlspin.com:12109/rets/login resulted in a 401 Unauthorized response:

I am hoping that you will reply on this. Thank you

carenamaemanzano avatar Apr 11 '18 07:04 carenamaemanzano

I found that adding this line before creating your session fixed the issue for me.

\PHRETS\Http\Client::set(new \GuzzleHttp\Client); //-- Add this line $rets = new \PHRETS\Session($config);

cbbov-rf avatar Apr 20 '18 18:04 cbbov-rf

I've also noticed that you can get a 401 Unauthorized error if you use the wrong Authentication Method.

$config->setHttpAuthenticationMethod('basic');

kodie avatar Aug 02 '19 17:08 kodie

I've also noticed that you can get a 401 Unauthorized error if you use the wrong Authentication Method.

$config->setHttpAuthenticationMethod('basic');

There went an hour or 2. Thanks!

vita10gy avatar Sep 26 '19 21:09 vita10gy