Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 [reason phrase] RETS-Session-ID is invalid #111

Closed
dhanya-dev opened this issue Aug 4, 2016 · 4 comments
Closed

401 [reason phrase] RETS-Session-ID is invalid #111

dhanya-dev opened this issue Aug 4, 2016 · 4 comments

Comments

@dhanya-dev
Copy link

hi,
Recently I have installed PHRETS 2.2 for downloading data but it is not working as I expected. For some servers i am facing the following issue while trying to download the data. Am I missing something here?

Uncaught GuzzleHttp\Exception\ClientException: Client error response [url] http://rets172lax.raprets.com:6123/Northtahoe/STAR/search.asp?SearchType=Property&Class=RES&Query=%28.........&QueryType=DMQL2&Count=1&Format=COMPACT-DECODED&Limit=99999999&StandardNames=0&Select=MLNumber [status code] 401 [reason phrase] RETS-Session-ID is invalid. in /var/www/factory/mls-project/php/SiFrameworks/phrets2.2/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:68
Stack trace:
#0 /var/www/factory/mls-project/php/SiFrameworks/phrets2.2/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php(31): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))
#1 /var/www/factory/mls-project/php/SiFrameworks/phrets2.2/vendor/guzzlehttp/guzzle/src/Event/Emitter.php(105): GuzzleHttp\Subscriber\HttpE in /var/www/factory/mls-project/php/SiFrameworks/phrets2.2/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 68

@morr0350
Copy link

You may be required to set the User Agent in your session configuration (something like
$config->setUserAgent('whateverUserAgentisRequired');
)
In our Rapattoni configurations, User Agent is always required. Rapattoni, or the real estate board you are working with, should have provided what they expect as the User Agent.

@troydavisson
Copy link
Owner

If the previous comment doesn't solve your issue, please re-open this. Otherwise, I'll assume (because my guess is, based on experience) this fixed it.

@alfchee
Copy link

alfchee commented Dec 30, 2017

@troydavisson I have the same problem reported by @dhanya-dev but even I'm setting the User Agent in the middle of getting data I'm getting the error, and also the client is ussing Rapattoni, then what can be causing me the error?

PHP Fatal error:  Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `GET http://rets172lax.raprets.com:6103/Cincynky/CIN/getmetadata.aspx?Type=METADATA-LOOKUP_TYPE&ID=Property%3ACity&Format=STANDARD-XML` resulted in a `401 RETS-Session-ID is invalid.` response:
<RETS ReplyCode="20513" ReplyText="Miscellaneous error. RETS-Session-ID is invalid." />

' in /home/aggs/agg-mls/php-agg/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /home/aggs/agg-mls/php-agg/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /home/aggs/agg-mls/php-agg/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /home/aggs/agg-mls/php-agg/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /home/aggs in /home/aggs/agg-mls/php-agg/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

@acmwallace
Copy link

@troydavisson - I am having the same issue, connecting to "Lexington-Bluegrass Association of REALTORS". I can log in fine, but get the error when trying to get system metadata. RETS-MD has no problem with this MLS, just the PHRETS library (1.7.2). Maybe the fact that the user agent in this case is just someones name ( "first last" )?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants