Trying to access GHL "Agent Report" via hidden API's but getting IAM Service issues

Good Afternoon,

Just wondered if anyone had any experience with calling hidden api’s on GHL?

I am trying to get the “Agent Report” from GHL for a client for each individual sub account.

For example the end point

https://backend.leadconnectorhq.com/reporting/opportunities/leaderboard-stats

I am setting this up and getting 401 errors relating to IAM config.

Is this accessible via n8n or not?

What do you mean by hidden API? Is this just a custom API? Or you mean private API? I did not find much information about it online.

If it’s private, like you found it by investigating GHL network requests, most likely you need custom auth config. That usually entails a generated key/token/and or JWT and some cookies for validation.

Where is this endpoint called or found?

It would be private then as it was found in the console.

Can you demo me where exactly? What was the root url you used to discover the endpoint?

My recommendation is finding it again, copying the request as CURL, pasting into a terminal and running (if on linux/mac) the curl command to see if it functions. Then slowly start removing things to see what is required. Typically special headers and cookies are required.

Then you can investigate the page to see where those are generated (if possible). Sometimes they are short lived or long lived, so you could also create a playwright script to capture the headers and cookies and then send to your scenario to use them.

This is the screenshot of where I got the details from.

You said alot of things there that went over my head, I am not a programmer by any stretch haha.

Why not just use a public API to recreate the leaderboard based on querying all convos/opportunities etc?

Because that is one element, I cannot grab things like the SMS data or calls from the Public API

Interesting. That seems true. Does their sms come from twilio? You may be able to fetch data that way. Or set up webhooks to keep data in a db moving forward.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.