API LIBRARY
Collapse Sidebar Menu
Expand Drawer

Legacy Authentication for RETS

While the legacy approach to RETS authentication described on this page still works and is not presently slated for deprecation, we are encouraging RETS users to migrate to the OAuth2 mechanism described here: https://docs-trestle.corelogic.com/Subtopic/OAuth2AuthenticationforRETS.

Legacy RETS authentication is accomplished by providing Basic HTTP authentication fields on every query, as described here:
Examples

Code Example

curl --output rets.xml \
--basic -u $username:$password \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-www-form-urlencoded' \
'https://api-uat.corelogic.com/trestle/RETS/Search?SearchType=Property&Class=Property&QueryType=DMQL2&Format=COMPACT-DECODED&Limit=10&StandardNames=0'

Code Example

<?php

$request = new HttpRequest();
$request->setUrl('https://api-prod.corelogic.com/trestle/odata/$metadata');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'cache-control' => 'no-cache'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}