API LIBRARY
Collapse Sidebar Menu
Expand Drawer

Authentication in RETS

To authenticate with the RETS protocol, you will need the username and password for your account. Substitute the values into the following examples.

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://trestle.corelogic.com/RETS/Login'

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;
}