asciisd / zoho-v3

Laravel Zoho API V3 Package
MIT License
16 stars 17 forks source link

Getting "invalid_client" error #8

Closed BartCardan closed 1 year ago

BartCardan commented 1 year ago

Hello, I've followed all steps on the readme. I always get the error "invalid_client". I am running laravel on localhost.

These is inside my .env file ZOHO_CLIENT_ID="1000.0IOA.........." ZOHO_CLIENT_SECRET="892598bc9................" ZOHO_REDIRECT_URI=http://localhost:8000/zoho/oauth2callback ZOHO_CURRENT_USER_EMAIL="b.......@te........" ZOHO_TOKEN="1000.e82a5234fda7................." ZOHO_SANDBOX=true ZOHO_ACCOUNTS_URL=https://accounts.zoho.eu ZOHO_API_BASE_URL=www.zohoapis.eu

Any idea what is going wrong? I can't figure out what to do next.

aemaddin commented 1 year ago

Hello @BartCardan

can you please check if your config file SANDBOX default value is boolean false not a string "false"

aemaddin commented 1 year ago

You can find this on config/zoho.php:105

'environment' => env('ZOHO_SANDBOX', false), 'datacenter' => env('ZOHO_DATACENTER', 'USDataCenter'),

aemaddin commented 1 year ago

also please update to the latest version and you can find a new feature that will set EUDatacenter here https://github.com/asciisd/zoho-v3#environments

BartCardan commented 1 year ago

@aemaddin Thank you. I will check later this week and report back asap. Please leave issue open for couple of days.

BartCardan commented 1 year ago

Thank you! I have updated to most recent version. Connection works fine now.