Zoho CRM OAuth setup [finally! šŸ˜“ ]

I finally figured it out how to make this darn thing work.

I will probably post it as a plug-in at some point so that we can iterate on this together.

A screenshot:

The same in text format for the copy-pasta warriors out there :spaghetti: .

  • Authentication: OAuth2 User-Agent Flow
  • App ID + App Secret: Zoho API how to register your client.
  • Scope: [whatever you need, link], for all of them: ZohoCRM.users.ALL,ZohoCRM.modules.ALL,ZohoCRM.settings.ALL
  • Authentication goes in header: :white_check_mark: checked
  • Token is returned as querystring: :x:
  • Requesting an access token uses Basic Auth: :x:
  • Add access_type=offline (Google APIs): :x:
  • Use a generic redirect URL (https://[your app]/api/1.1/oauth_redirect): :white_check_mark:
  • Login dialog redirect: https://accounts.zoho.com/oauth/v2/auth
  • Access token endpoint: https://accounts.zoho.com/oauth/v2/token
  • User profile endpoint: https://www.zohoapis.com/crm/v2/users
  • User ID key path: users
  • User email key path: email
8 Likes

I would suggest that this is going to give you issues at some point.

What you are telling Bubble in this field is the ā€œunique idā€ of the user that has just signed up.

So what you are telling Bubble with your set up as that the WHOLE of the JSON returned is the unique id. But if they change their first name ā€¦ that may not be the same.

So Bubble fields Users ā€¦ and uses that as you told it ā€¦

image

email works better ā€¦ because it is the name of the email field ā€¦

image

Might be worth changing User Id Key Path to ā€œidā€ instead ?

3 Likes

So thatā€™s how the darn thing works! Thanks for the lesson.

[update] Iā€™ve changed it and it does not work. The first time I did it worked, but it seemed that it was still using users and not id.

I think it doesnā€™t work due to the fact that the response is an array. Iā€™ve tried via the plugin builder and I can capture a response:

I can see that the email is of another admin in our system, not mine. Is there a way to tell Bubble to look into the users array, into the xx item, and get that id?

What a gem! been trying to figure this thing out!!! lol, Should have started searching in this forum. Post is a little old, but just a newbie question, what type of Client did you configure/used in Zoho? Server Based Application?

Yes, i think, its a Sever Based Application.

@rico.trevisan wondering if you did build a plugin for the Zoho connection?

Unfortunately not. The business ended up changing, moved away from Zoho (to a niche Brazilian ISP system).

Do you still need help with this?

1 Like

Ok thatā€™s all good.
I have been looking at using Zoho SalesIQ on my Bubble app as an alternative to the likes of Intercom. I have been able to install it by using the Zoho SalesIQ HTML snippet, and it works really well.

But Iā€™m not to sure how to send user data from Bubble to Zoho SalesIQ. It would be great to be able to send the details of logged-in users from Bubble to Zoho SalesIQ.
(Also sorry yes Zoho Sales IQ is a different program to Zoho CRM, but I assume the backend APIs use the same setup).

Im also a bit surprised that Zoho SalesIQ doesnā€™t seem to be used more for live chat/customer support as a much more price effective alternative to Intercomā€¦there seems to be 5 different plugins for integrating Intercom, but I canā€™t find much at all for Zoho. (Maybe Iā€™m overlooking something here as to what makes Intercom so popular).

Indeed. When I was using Zoho I was surprised more people werenā€™t using it. Itā€™s a rather good deal.

i know how confusing setting up oauth in zoho crm can be. i went through it recently, and it took a bit of trial and error

This is because you are not using the correct user endpoint. Well, I know itā€™s not very well documented however. (Domain is in Canada for meā€¦ you may need to change the base url)

Hereā€™s how I did it, step-by-step, so maybe itā€™ll help you too. First, you need to create a new client in the Zoho API Console. Go to the console, find the ā€œAdd Clientā€ option, and fill out the form with your app details. Make sure to select the correct Client Type based on your appā€™s needs. After submitting, youā€™ll get a Client ID and Client Secret, which are crucial for the next steps. Next, you need to configure your redirect URL. This URL is where Zoho will send the authorization code after a user grants permission to your app. Ensure this URL is correctly set up in both your app and the Zoho API Console. This step tripped me up initially, so double-check for any typos or mismatches.