Skip to main content

Hi, I hope someone here can help me.

I have been trying to establish a connection to ZohoCRM using FireDac CDataZohoCRM component and I have failed 100% of my attempts.

I do have a general idea on how the OAuth protocol works. To help myself understanding I have used Postman to test the parameters I use (client_id, client_secret, tokens etc) From Postman I did not encounter any difficulty.

I believe that the main issue I am finding with the FireDac CDataZohoCRM is the amount of granularity that your component offers it is a bit overwhelming. I am sure that the granularity offered it is probably a great asset for someone that has an expertise on this. However as a beginner, I got into a point where I would have to brute force the component testing every single permutation and combination to isolate my mistakes on the misuse of the connector.

A I understand from the documentation the SSLServerCert attribute it is not mandatory here and it can be replaced by a “*”. Not secured but not mandatory.

I don’t know what I am doing wrong and I would appreciate same help. I enclose the parameters that I have now (I intentionally removed  some characters from the ClientID, ClientSecret and tokens for security reasons).

I have also tried to run the Wizard providing the Client ID  and the Client Secret parameters but I have not been able to  succeed.

I am also aware on the delays of the generated tokens so  I always worked within the time frame that Zoho allows me.

I generated  OAuthRefreshToken on Postman and as you can see It did properly generate.

If anyone out there has a printscreen of a working connector I would really appreciate if you can share it with me. Just cover the sensitive information. I have the feeling that I am just a few attributes away from making it work I just don’t know which ones.

Please see my settings below. I also uploaded a log file with more details.

(The application that I am attempting to write is in Delphi Alexandria Enterprise Edition)

Thank you all.

 

================================
Connection definition parameters
================================
SSLServerCert=*
InitiateOAuth=GETANDREFRESH
OAuthClientId=*****
OAuthClientSecret=******
APIDomain=https://www.zohoapis.com
OAuthAccessToken=*****
OAuthRefreshToken=*****
ProxySSLType=NEVER
Logfile=c:\temp\zoho.txt
Verbosity=5
CallbackURL=https://formacion.com
DriverID=CDataZohoCRM
Pooled=False
================================
FireDAC info
================================
Tool = RAD Studio 11.0
FireDAC = 28.0.0 (Build 106147)
Platform = Windows 32 bit
Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
================================
Client info
================================
Loading driver CDataZohoCRM ...
  Creating CData environment handle
================================
Session info
================================
Failed to connect to DBMS !
tFireDAC]
 

Hey @Julio_Ravazzano 

Thanks for reaching out to us. We understand the challenge and how overwhelming can it get if you are starting out with this integration for the first time.
 

I think a good starting guide is available here for you to take a look at on how to connect to Zoho CRM if you have your own OAuth credentials: https://cdn.cdata.com/help/CZJ/fire/pg_oauthcustomapp.htm. Can you confirm if you have followed the steps here?
 

Looking at the error you have copied: The remote host disconnected during SSL negotiation, certainly looks like an issue with TLS Handshake. Can you reset the ProxySSLType=Auto and try again? I have a feeling that the driver is not able to route the request correctly. Setting this value to Auto should allow the driver to switch to the right ProxySSL type depending on connection needs as mentioned here: https://cdn.cdata.com/help/CZJ/fire/RSBZohoCRM_p_ProxySSLType.htm.
 

Can you check this and confirm if this helps?


The best that I have been able to get close of working with the component when trying to create a connection using the Wizard button it is to open the ZohoCRM web page but it tells me “Invalid Redirect Uri” “Redirect URI passed does not match with the one configured” and I just do not know what it means. On the FireDAC Connection editor there is no redirect_url   property <---- This one I have it on Postman and on Postman it does work. On postman I can generate the tokens: The initial token that last for 10 minutes, the Refresh token that it is supposed to be permanent and the working tokens that last one hour. I can also interrogate the Zoho CRM tables.

 

Would you happen to have a print screen showing how it is supposed to look like a connection when successful ? Or a video ?

 

The only 2 places that I can thing of using URLs are:

APIDomain: https://www.zohoapis.com

CallbackURL: if I put any information here I get : “Could not bind server Socket: The requested address is not valid in its context” I have tired http://localhost:33333 (in all different possible formats) but always the same error. When it’s empty I make it to the web page from Zoho as shown on the link below. Note: on Postman I have a parameter redirect_url with the value of http://localhost:33333 and it does work.

 

At the end of the link below I can see redirect_uri but I have not a clue where that parametter gets picked up from. Or where should I enter it on the FireDAC connection editor for Zoho CRM

https://accounts.zoho.com/oauth/v2/auth?access_type=offline&scope=ZohoCRM.modules.visits.READ%2cZohoCRM.modules.visits.DELETE%2cZohoCRM.modules.ALL%2cZohoCRM.settings.ALL%2cZohoCRM.users.ALL%2cZohoCRM.org.ALL%2cZohoCRM.settings.territories.ALL%2cZohoCRM.settings.currencies.READ%2cZohoCRM.settings.currencies.CREATE%2cZohoCRM.settings.currencies.UPDATE%2cZohoCRM.settings.pipeline.UPDATE%2cZohoCRM.settings.pipeline.READ%2cZohoCRM.settings.pipeline.CREATE%2cZohoCRM.settings.ALL%2cZohoCRM.modules.Accounts.READ%2cZohoCRM.modules.Leads.READ%2cZohoSearch.securesearch.READ%2cZohoCRM.coql.READ&prompt=consent&client_id=1000.ETNBBJ9QOYUEX4DKECSMVGXOAD2XUC&response_type=code&redirect_uri=http%3a%2f%2flocalhost%3a33333

 


Reply