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

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

Open
eseopros opened this issue Jan 4, 2023 · 0 comments

Comments

@eseopros
Copy link

eseopros commented Jan 4, 2023

< 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

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

1 participant