asciisd / zoho-v3 Goto Github PK
View Code? Open in Web Editor NEWLaravel Zoho API V3 Package
License: MIT License
Laravel Zoho API V3 Package
License: MIT License
How do i get the list of attachment in a module ?
$leads = ZohoManager::useModule('Leads');
$lead = $leads->getRecord($request->leadid);
$lead_attachments = $lead->getRelatedListRecords('Attachments');
$lead =$lead->getkeyValues();
error : Call to undefined method com\zoho\crm\api\record\Record::getRelatedListRecords()
The composer.json file in this package is set to use Zoho V2.1.
"require": {
"php": "^8.1",
"illuminate/contracts": "^8.0|^9.0",
"spatie/laravel-package-tools": "^1.9.2",
"zohocrm/php-sdk-2.1": "6.0.0"
},
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.
I have setup a server side Client in zoho and set everything up. Everything was done Successfully but after I add my code generated by php artisan zoho:authentication following this link in ENV it genrates a empty file after php artisan zoho:grant and when I try to get data from ZOHO it gives me invalid_code. Screen Shots are attached. And few days back it was genrating refresh token and everything perfectly.
I've been looking into an issue with the API but did not find any issues in the log (neither the SDK Log nor the Laravel log).
I specifically was looking into authentication issues not being logged when retrieving records like so:
$manager = ZohoManager::make('Deals');
$record = $manager->getRecord($id);
To reproduce:
storage/app/zoho/oauth/tokens/zcrm_oauthtokens.txt
so the access_token is wrong and run the above code.For me it boils down to this line
Suggested Fix
use com\zoho\crm\api\modules\APIException;
should be
use com\zoho\crm\api\record\APIException;
Or is there a specific reason to use modules i am missing?
This is my first attempt using this package and I followed the instructions with no success. After trying to diagnose, I stumbled upon the artisan commands that aren't mentioned in the documentation.
After running "php artisan zoho:install" some things seemed to start working.
I am still uncertain of .env setting: ZOHO_TOKEN="Code Generated from last step". What other things I might be missing?
Would you update the instructions to include any missing installation steps?
Thanks
hello, im trying to create a tag and associate it to a lead ¿is there a way to make that with this package or even access the token to make it from api ?
thanks for your help
web.php in the vendor package has an error when referencing the ZohoController, fixed by changing
Route::get('oauth2callback', 'ZohoController@oauth2callback');
to
Route::get('oauth2callback', 'Asciisd\Zoho\Http\Controllers\ZohoController@oauth2callback');
Attaching 2 screenshots of the issue, one of the location in the JSON converter where this error is being thrown, and the other of the output of the error itself and the dd() statement immediately prior to it..
This was working perfectly until I added this new Pick List element in the Deals module, not sure why it would be blowing up now.. any thoughts?
In old version asciisd/zoho I could use getRelatedListRecords to get all related contacts to an account.
In zoho-v3 I get the following error
Call to undefined method com\zoho\crm\api\record\Record::getRelatedListRecords()
Simplified version of my code:
$zoho_accounts = ZohoManager::useModule('Accounts');
$accounts=$zoho_accounts->searchRecordsByCriteria('(Dashboard:equals:true) and (Dashboard_not_exists:equals:true)');
foreach($accounts as $account) {
$contacts=$account->getRelatedListRecords('Contacts');
}
Is the function getRelatedListRecords replaced with a new function?
How to get my related contacts from a specific account?
As the docs say in order to update a record we must first perform a $record->setId('xxxxxxxxxxxxx')
on the Zoho Record before adding KeyValues. Using $this->asZohoObject()
will only fetch the existing record from Zoho as far as I can see.
Personally I can't perform record updates with the current implementation. The response from $isUpdated
is always just an empty array, not an com\zoho\crm\api\record\SuccessResponse
Object as it should be.
In order to fix this we must add the following line after
zoho-v3/src/Traits/Zohoable.php
Line 190 in c13bfcd
$record->setId($record->getId());
// or
$record->setId($this->zohoId());
now I get the correct SuccessResponse.
Hey there and thanks a lot for the package!
The underlying php-sdk-2.1 allows for three different authentication flows:
I only had access to credentials allowing the refreshToken Flow so i wanted to use that.
How do you feel about making the authentication flow a configuration option in this package?
Hi, I'm trying to use the example you wrote
$manager = ZohoManager::make('Leads');
$modules = $manager->getAllModules();
but I'm getting the exception that follows
com\zoho\crm\api\exception\SDKException : SDK is UnInitialized
I think I'm doing something wrong, could you please help?
"php": "^8.1",
"asciisd/zoho-v3": "^1.1",
"auth0/login": "7.4.*",
"guzzlehttp/guzzle": "^7.5",
"laravel/framework": "v9.3.0",
"laravel/sanctum": "^v2.15.0",
"laravel/slack-notification-channel": "^2.5",
"laravel/tinker": "^2.8",
"nyholm/psr7": "^1.5",
"spatie/laravel-permission": "^5.9",
"spatie/laravel-slack-alerts": "^1.2",
"symfony/http-client": "^6.2"
this is my stack.
Could it be that I have some incompatible laravel files?
I get this error below:
Command:
$leads = ZohoManager::useModule('Leads');
$lead = $leads->getRecord('XXXXXXXXXXXX');
Error
Typed property Asciisd\Zoho\ZohoManager::$module_api_name must not be accessed before initialization
Followed this and it gives me an error
com \ zoho \ crm \ api \ exception\ SDKException
$bank = ZohoManager::useModule('Banks');
$response = $bank->create([
'Deal' => $dealid,
'Bank_Institution_Name' => $json_data->bank_name,
'Account_Name' => $json_data->account_name,
'Account_Number' => $json_data->account_number,
]);
Banks is the API name of the custom module.
Hey
This is the error i got, when I try to create a User and after that, to run ->createAsZohoable
I've tried to do the same thing with Tinkerwell and this is the error I became:
It doesn't matter if I run createAsZohoable() with or without options. The error is still the same.
Here are my Settings out of the .env file:
ZOHO_ACCOUNTS_URL=https://accounts.zoho.eu
ZOHO_API_BASE_URL=www.zohoapis.eu
ZOHO_AUTH_FLOW_TYPE=grantToken
ZOHO_CLIENT_ID="1000.xxx"
ZOHO_CLIENT_SECRET="daxxx"
ZOHO_REDIRECT_URI="${APP_URL}/zoho/oauth2callback"
[email protected]
ZOHO_TOKEN="1000.xxx"
# available datacenters (USDataCenter, EUDataCenter, INDataCenter, CNDataCenter, AUDataCenter)
ZOHO_DATACENTER=EUDataCenter
ZOHO_SANDBOX=false
Please HELP!
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.