APIs & Integrations

jp-ikhokha
メンバー

Get the Role of currently logged in user

解決

Hi, just to confirm - at  present there is no way to get the Identity / Role of the currently logged in user either through an API call or through a  HUBL variable?

This is for an app built inside Hubspot, personalised functionality needs to be made available based on the logged in users role.

 

Thanks

 

JP

1件の承認済みベストアンサー
Willson
解決策
HubSpot Employee
HubSpot Employee

Get the Role of currently logged in user

解決

Hi @jp-ikhokha 

 

I can confirm that we do not currently provide any means of surfacing this information via the API or through the use of HubL at this time. 

 

Thanks!

Product Manager @ HubSpot

元の投稿で解決策を見る

5件の返信
ckhicks
参加者

Get the Role of currently logged in user

解決

...more updates! We found this in the React <> HubSpot repo and it may do the trick: https://github.com/HubSpot/cms-event-registration/blob/master/src/event.functions/membership.js

 

Serverless functions to the rescue!

0 いいね!
ckhicks
参加者

Get the Role of currently logged in user

解決

Actually...this is exactly what I'm looking for: https://legacydocs.hubspot.com/docs/methods/contacts/get_contact_by_utk

 

Any hopes of this being in a recent version of the API?

ckhicks
参加者

Get the Role of currently logged in user

解決

@krillewestling I have the same question...surely there's a filter for detecting a logged-in user, correct?

 

@Willson How else could you filter paid content to exclude bots/etc.? Like this, but in HubL: https://knowledge.hubspot.com/website-pages/require-member-registration-to-access-private-content

0 いいね!
krillewestling
メンバー

Get the Role of currently logged in user

解決

Hi @Willson!

 

My team need a way to show certain information only to logged in "site administrators" on individual blog posts. (CMS Hub Professional)

I guess that the user role is not that important at this stage. A simple "is_logged_in" hubl variable or something like that would be enough.

Is there no way to accomplish this? I'm hoping that I've just missed that information in the documentation. 🙂

 

Willson
解決策
HubSpot Employee
HubSpot Employee

Get the Role of currently logged in user

解決

Hi @jp-ikhokha 

 

I can confirm that we do not currently provide any means of surfacing this information via the API or through the use of HubL at this time. 

 

Thanks!

Product Manager @ HubSpot