Skip to main content
Solved

What is the best way to call the community API from the community platform

  • January 23, 2026
  • 4 replies
  • 16 views

AndrewK

Hi all, I’m new to Gainsight.

 

If I wanted to create a custom widget for the community that leverages the community API would that require Secure API Connectors and id and secret? Or is there any built short cut that would allow access to community data maybe with the logged in users permissions?

 

Thanks!

Best answer by DannyPancratz

Oh, yes. For that use case Secure API Connectors is the best way; I believe it was designed for exactlly your type of use case. 

I haven’t used this new feature myself yet, so I’m not much help there. 

My hypothesis on the role-based access of the particular logged-in user: that sounds very complex and unlikely to be possible. My reasoning is that I’ve used or looked at most API calls and they typically use the admin access of their client id/secret, and I don’t believe I’ve ever seen the ability to filter by a userId (and their permission set) on a content-based call like GET ideas.

There’s probably a multi-step way to get to that: 

  1. widget calls the API about that user to get their roles
  2. widget has some way to align roles with the access of certain ideas
  3. widget has those parameters to filter the call for ideas

But your work is cut out for you there. 

If i was given this use case to deliver, I’d very likely simplify to: 

  • Separate widgets for each access type of Ideas
  • Widget visibility settings for each widget based on segments

That combination has a bit of duplicative effort, but the widget visibility via segments would be the most reliable way to control who sees what. It’s also complex, but I’d rather solve complexity in segments and visibility settings, than try to solve it in the API calls that aren’t designed to filter by current user. 

4 replies

DannyPancratz
Forum|alt.badge.img+9
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • January 23, 2026

It really depends on your use case. That would determine the “best” way. 

You need not use the Secure API Connectors, but that’s an option. However, you can call the API with any tool that can call APIs. 

If you’re just looking to get data or do one-off actions (ex. update something on a user’s profile), tools like Postman work and are great. 

If you’re looking to to use a series or set of API calls, or to automate something, then whatever automation tools your company uses should be capable. We use Zapier, which is how I run 99% of my API calls. A helpful aspect is that Zapier has pre-built connections for Gainsight CC, saving me from having to run the authentication in each automation; there is a pre-built Zapier action for running an API call: API Request (Beta). 

Whatever the tool, it will need to authenticate you via the creation of a client id and secret. Which you can do via the API section in control. More instructions in the API documentation. 

 


AndrewK
  • Author
  • Contributor ⭐️⭐️
  • January 23, 2026

Thanks for the info! My particular use case though would be calling the API from the community platform itself in a widget.

 

So, for example, if I wanted to create a “Recent Ideas” widget on the home page that used the API to get the 5 most recent ideas. Would I need to use the platform’s secure API connectors similar to if I wanted to call an external API or are there any built-in ways to accomplish that. Also, any way to do that with the logged in user’s permissions so for example if there was a recent idea that the user does not have permission to view the API would not return it. (Maybe that last part is easier to achieve with segments)


DannyPancratz
Forum|alt.badge.img+9
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • Answer
  • January 23, 2026

Oh, yes. For that use case Secure API Connectors is the best way; I believe it was designed for exactlly your type of use case. 

I haven’t used this new feature myself yet, so I’m not much help there. 

My hypothesis on the role-based access of the particular logged-in user: that sounds very complex and unlikely to be possible. My reasoning is that I’ve used or looked at most API calls and they typically use the admin access of their client id/secret, and I don’t believe I’ve ever seen the ability to filter by a userId (and their permission set) on a content-based call like GET ideas.

There’s probably a multi-step way to get to that: 

  1. widget calls the API about that user to get their roles
  2. widget has some way to align roles with the access of certain ideas
  3. widget has those parameters to filter the call for ideas

But your work is cut out for you there. 

If i was given this use case to deliver, I’d very likely simplify to: 

  • Separate widgets for each access type of Ideas
  • Widget visibility settings for each widget based on segments

That combination has a bit of duplicative effort, but the widget visibility via segments would be the most reliable way to control who sees what. It’s also complex, but I’d rather solve complexity in segments and visibility settings, than try to solve it in the API calls that aren’t designed to filter by current user. 


AndrewK
  • Author
  • Contributor ⭐️⭐️
  • January 23, 2026

Thanks for the quick response! That makes sense and segments seem like a really useful way to approach things like this.