php-connect-rest-sample icon indicating copy to clipboard operation
php-connect-rest-sample copied to clipboard

Something went wrong, couldn't get tokens: invalid_client

Open louis12356 opened this issue 9 years ago • 4 comments

`Notice: Use of undefined constant clientId - assumed 'clientId' in C:\xampp\htdocs\app\oauth.php on line 30

Notice: Use of undefined constant clientSecret - assumed 'clientSecret' in C:\xampp\htdocs\app\oauth.php on line 31

Notice: Use of undefined constant redirectUri - assumed 'redirectUri' in C:\xampp\htdocs\app\oauth.php on line 32

Notice: Use of undefined constant urlAuthorize - assumed 'urlAuthorize' in C:\xampp\htdocs\app\oauth.php on line 33

Notice: Use of undefined constant urlAccessToken - assumed 'urlAccessToken' in C:\xampp\htdocs\app\oauth.php on line 34

Notice: Use of undefined constant urlResourceOwnerDetails - assumed 'urlResourceOwnerDetails' in C:\xampp\htdocs\app\oauth.php on line 35

Notice: Use of undefined constant scopes - assumed 'scopes' in C:\xampp\htdocs\app\oauth.php on line 36

Notice: Use of undefined constant code - assumed 'code' in C:\xampp\htdocs\app\oauth.php on line 59 Something went wrong, couldn't get tokens: invalid_client`

I just started a new project, what is wrong here ? I logged in with a buisness microsoft account, and then these erroes appear.

louis12356 avatar Sep 21 '17 12:09 louis12356

Thanks for sharing this. Have you updated the corresponding clientId and clientSecret values in the Constants.php file?

jamescro avatar Oct 10 '17 16:10 jamescro

I'll need to check that, but as this is not mentioned in the README, i wont have done that.

Im gonna report soon.

louis12356 avatar Oct 10 '17 17:10 louis12356

Sorry for any confusion. Did you see these steps in the Readme?

Configure and run the app Using your favorite IDE, open Constants.php in the src folder. Replace ENTER_YOUR_CLIENT_ID with the application id from the previous section. Replace ENTER_YOUR_SECRET with the password from the previous section. Install the dependencies with the following command: composer install Start the built-in web server with the following command: php -S 0.0.0.0:8000 -t app Navigate to http://localhost:8000 in your web browser.

jamescro avatar Oct 10 '17 17:10 jamescro

Closing for now. Please reopen if this continues to be an issue.

jamescro avatar Nov 06 '17 16:11 jamescro