Connection Error to new RETS server

893 views
Skip to first unread message

angelina_zooma

unread,
Dec 10, 2011, 8:30:34 PM12/10/11
to PHRETS
The board my client is with is changing their RETS server and they
have set me up with an account there. I swapped out the login
credentials for the new ones and now my scripts aren't working.

Going back to basics I decided to test the connection using the
Example A code from the site and I'm getting a connection error.

I know the login is correct because I can successfully log in using
Rets Connector.

Here is the debug file:

* About to connect() to rhb.rets.interealty.com port 80 (#0)
* Trying 69.87.62.186... * connected
* Connected to rhb.rets.interealty.com (69.87.62.186) port 80 (#0)
> GET /Login.asmx/Login HTTP/1.1
Host: rhb.rets.interealty.com
Accept: */*
RETS-Version: RETS/1.5
User-Agent: PHRETS/1.0
Accept: */*


< HTTP/1.1 200 OK
< Date: Sun, 11 Dec 2011 01:30:28 GMT
< Server: Microsoft-IIS/6.0
< Cache-Control:private
< X-AspNet-Version: 2.0.50727
< Transfer-Encoding: chunked
< Cache-Control: private
< Content-Type: text/xml; charset=utf-8
<
* Connection #0 to host rhb.rets.interealty.com left intact
<RETS ReplyCode="20037" ReplyText="User Agent not registered or
denied. Reference: 7e516643-8ca5-4ef3-8752-db30f9e645d1" />
* Closing connection #0

Troy Arnold

unread,
Dec 10, 2011, 10:05:56 PM12/10/11
to phr...@googlegroups.com
On Sat, Dec 10, 2011 at 05:30:34PM -0800, angelina_zooma wrote:
> <
> * Connection #0 to host rhb.rets.interealty.com left intact
> <RETS ReplyCode="20037" ReplyText="User Agent not registered or
> denied. Reference: 7e516643-8ca5-4ef3-8752-db30f9e645d1" />
> * Closing connection #0

Looks like the RETS provider requires you to include user agent info so
they know what data is allowed for your account. They should have included
a user-agent string along with the rest of your authorization info.

Do something like this before calling $rets->Connect():

$rets->AddHeader("User-Agent", 'your_given_user_agent');

angelina_zooma

unread,
Dec 10, 2011, 11:55:42 PM12/10/11
to PHRETS
Thanks Troy, but no dice :(

server admin sent me the proper user agent (RETSConnector/1.5) and I
attempted again using that, but it's still failing:

* About to connect() to rhb.rets.interealty.com port 80 (#0)
* Trying 69.87.62.186... * connected
* Connected to rhb.rets.interealty.com (69.87.62.186) port 80 (#0)
> GET /Login.asmx/Login HTTP/1.1
Host: rhb.rets.interealty.com
Accept: */*

User-Agent: RETSConnector/1.5
RETS-Version: RETS/1.5
Accept: */*


< HTTP/1.1 200 OK
< Date: Sun, 11 Dec 2011 04:54:32 GMT
< Server: Microsoft-IIS/6.0
< Cache-Control:private
< X-Powered-By: ASP.NET


< X-AspNet-Version: 2.0.50727
< Transfer-Encoding: chunked
< Cache-Control: private
< Content-Type: text/xml; charset=utf-8
<

* Connection #0 to host rhb.rets.interealty.com left intact
<RETS ReplyCode="20037" ReplyText="User Agent not registered or

denied. Reference: 05cf848c-f16a-49b3-b1bd-27b5e9b3c8ea" />
* Closing connection #0

Troy Arnold

unread,
Dec 11, 2011, 7:41:13 AM12/11/11
to phr...@googlegroups.com
Ok I found this note in the release notes for phrets-1.0rc1:
" + New SetParam() options
- use_interealty_ua_auth: value is true or false. default is false.
only use with User-Agent authentication on Interealty servers

So, before connect() try:
$rets->SetParam('use_interealty_ua_auth', true);

If that doesn't work, check with your contact again and make sure the
server doesn't also want a user agent password. So that would be 4 things
total, username, password, UA and UA password.

Hopefully the setparam() call will do the trick...

-t

> --
> You received this message because you are subscribed to the Google Groups "PHRETS" group.
> To post to this group, send email to phr...@googlegroups.com.
> To unsubscribe from this group, send email to phrets+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phrets?hl=en.
>

angelina_zooma

unread,
Dec 11, 2011, 12:59:01 PM12/11/11
to PHRETS
Hi Troy, I've added that line but there's no change.

The server admin said there was no password required, so I'm going to
email him again and see if he can double check the info he gave me.

thanks for all your help!

angelina_zooma

unread,
Dec 12, 2011, 1:09:55 AM12/12/11
to PHRETS
It's working now.. turns out the server admin did give me the wrong
user agent.

thanks again!

Todd Albert

unread,
Jun 20, 2013, 3:21:02 PM6/20/13
to phr...@googlegroups.com
Did you try property type "A"?

On Wednesday, March 13, 2013 6:37:34 PM UTC-4, Jeff Kee wrote:
Angelina, I managed to solve my issue thanks to your post here. Thanks!

unrelated perhaps.. but I'm working with the same board, and I"m having issue getting the properties spitting out. 


$search = $rets->SearchQuery("Property", 'Residential/Condominium', '(ListDate=2012-03-05-2012-03-08)', array('Limit' => 5));


I tried RES, 1, or Residential/Condominium for the property type name field.. still no dice. 
Reply all
Reply to author
Forward
0 new messages