oAuth with Zoho CRM

Hello! New to Wappler, loving it so far. Can someone please point me in the right direction to get an oAuth setup with Zoho CRM? (https://www.zoho.com/crm/help/api/v2/#oauth-request)

I am getting the following error in my php file.

{“code”:1,“file”:"/home/ssmobile/public_html/missioncontrol/dmxConnectLib/modules/oauth.php",“line”:140,“message”:“Class ‘lib\oauth\Oauth2’ not found”}

Could you provide a screenshot of how I setup the oAuthProvider and oAuth Authorize.

Thanks in advance!

~Lee

Hi Lee!

Welcome to Wappler!

Seems you hit a small bug in the Oauth2 mobile - on case sensitive OS Linux/Mac

Could you try to rename the following file:
/dmxConnectLib/lib/oauth/oauth2.php

to
/dmxConnectLib/lib/oauth/Oauth2.php

(just the first letter of Oauth2 to capital letter)

Let me know if that helps

Hi George! Thanks so much for the quick response. Okay I was able to get the oAuth to work but I am getting a CORS error. It is indeed outputting the API call to the php file as I can see that in the file but I can’t seem to get it to populate the webpage table using server connect.

"Access to XMLHttpRequest at ‘https://accounts.zoho.com/oauth/v2/auth?redirect_uri=https%3A%2F%2Fmissioncontrol.streamsurfermobile.com%2FdmxConnect%2Fapi%2FScripts%2FZohoCRM.php&response_type=code&access_type=online&client_id=[removed for security]&scope=ZohoCRM.modules.all&state=79487960e853d7e3b24cd8e5056609524024051c7118a124626f6bb69044fa2c’ (redirected from 'https://missioncontrol.streamsurfermobile.com/dmxConnect/api/Scripts/ZohoCRM.php?’) from origin ‘https://missioncontrol.streamsurfermobile.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

I tried adding an Access-Control-Allow-Origin to the API Action headers but no luck. Any guidance? Thanks!

Hi @George any insights to this? I tinkered with it all weekend but I am missing something simple I think for the CORS. Thanks!

The oauth2 filename issue has been solved already some time ago.

If you have any other issues. Please post a new topic.