RESOStandards / RESO-WebAPI-Client-PHP

RESO Web API Open Source Reference Client written in PHP
Other
4 stars 2 forks source link

Fatal error: Uncaught RESO\Error\Api: RESO\OpenIDConnect::requestAccessToken() #13

Open eseopros opened 1 year ago

eseopros commented 1 year ago

< Fatal error: Uncaught RESO\Error\Api: RESO\OpenIDConnect::requestAccessToken() >

I downloaded the class as referenced on : https://trestle-documentation.corelogic.com/webapi-libraries.html#php I decided to test out example-cli.php rets/examples/cli-example/example-cli.php I placed the values in config.php // API authentication URL $api_auth_url = "https://trestle.corelogic.com/BKR/Connections"; // API token URL $api_token_url = "https://api-prod.corelogic.com/trestle/oidc/connect/token"; // API data request (web) URL $api_request_url = "https://api-prod.corelogic.com/trestle/odata/"; $auth_username = I placed the login user here // API password $auth_password = I placed the login password here $client_id = "e89d3c24_beaf_4fed_84d1_9ffa0df39f2d"; $client_secret = "8e7407419ad0443887dc5fdd9c279941"; // Redirect URI $redirect_uri = "https://www.thedentallist.com/rets"; // Scope $scope = "WebAPI"; if(file_exists(dirname(__FILE__)."/_config.php")) { require_once(dirname(__FILE__) . "/_config.php"); } I am testing example-cli.php via the link below Link : https://thedentallist.com/rets/examples/cli-example/example-cli.php Error #!/usr/bin/env php [2023-01-04T01:10:35+00:00] Setting RESO API client id to 'e89d3c24_beaf_4fed_84d1_9ffa0df39f2d'. [2023-01-04T01:10:35+00:00] Setting RESO API client secret. [2023-01-04T01:10:35+00:00] Setting RESO API auth URL to 'https://trestle.corelogic.com/BKR/Connections'. [2023-01-04T01:10:35+00:00] Setting RESO API token URL to 'https://api-prod.corelogic.com/trestle/oidc/connect/token'. [2023-01-04T01:10:35+00:00] Setting RESO API request URL to 'https://api-prod.corelogic.com/trestle/odata/'. [2023-01-04T01:10:35+00:00] Initiating RESO API authorization. [2023-01-04T01:10:36+00:00] Sending authorization request to retrieve access token. [2023-01-04T01:10:36+00:00] EXCEPTION: Failed to obtain access token. Fatal error: Uncaught RESO\Error\Api: Failed to obtain access token. in /var/www/vhosts/thedentallist.com/httpdocs/rets/lib/OpenIDConnect.php:132 Stack trace: #0 /var/www/vhosts/thedentallist.com/httpdocs/rets/examples/cli-example/example-cli.php(24): RESO\OpenIDConnect::requestAccessToken() #1 {main} thrown in /var/www/vhosts/thedentallist.com/httpdocs/rets/lib/OpenIDConnect.php on line 132 Any suggestions