asciisd / zoho

Zoho package for Laravel
36 stars 36 forks source link

Exception while retrieving tokens from persistence #4

Closed ChrisSantiago82 closed 4 years ago

ChrisSantiago82 commented 4 years ago

I was really happy to found your package to use it with Zoho. But sadly I'm getting an error when I'm trying to create a lead.

I was able to create the Client In zoho, including the self client in zoho. On the console I can create the token with the php artisan zoho:grant ..... and I'm getting a "Zoho CRM has been set up successfully" message. So far so good.

When I use the Fascade, still everything is working _use Asciisd\Zoho\Facades\Zoho; $leads = Zoho::useModule('Leads');

When I want to create a lead, I'm getting a Exception while retrieving tokens from persistence. When I go directly to the file (/app/zoho/oauth/tokens), I have the zcrm_oauthtokens.txt file, and it has data inside. Because of this I assume the token really was created.

The error "Exception while retrieving tokens from persistence" comes from the zoho php sdk. When I google it, I find this in the zoho forum (https://help.zoho.com/portal/en/community/topic/no-tokens-exist-for-the-given-user-identifier-please-generate-and-try-again).

I also have tried to create a new token, but the same thing happens. It seams that it can't open the file zcrm_oauthtokens.txt . Do you have any idea or hints that could help me? image

ChrisSantiago82 commented 4 years ago

I have solved this problem. I'm really sorry. I have put the wrong email address in the env file. This was really stupid of me. Thanks again for this package

aemaddin commented 4 years ago

Hi Chris,

Thanks for you kind words and I hope that package is helpful for you.