HubSpot App Settings - Can't distinguish which app 'user' is selected in the Account Component

Hi everyone :waving_hand:

I’m currently testing the HubSpot App Settings feature. Using the request data sent from HubSpot, I’ve come up against a problem when trying to identify which app user is selected in the account component drop down selector …

So it’s clear that HubSpot has successfully identified that my app has 2 users, as per my account component response:

{'response': {'accounts': [{'accountId': 'zach.xxx.xxx@gmail.com', 'accountName': 'Zach xxx'}, {'accountId': 'zook.yyy.yyy@gmail.com', 'accountName': 'Zook yyy'}]}}

However, on subsequent requests for app settings control components (specifically a toggle control), regardless of which app user I select in the dropdown menu, HubSpot is sending me information relevant to my HubSpot account that I’m logged in with:

{'actionType': 'TOGGLE_FETCH', 'portalId': 'xxx', 'userId': '9887783', 'userEmail': 'zach.xxx.xxx@gmail.com', 'appId': 'zzz', 'accountId': 'zach.xxx.xxx@gmail.com'}

Unless I’m missing something, this means I can’t differentiate which app user has been selected in the dropdown menu. I am currently experiencing this issue on app settings preview and on deployed app settings pages.

Can anyone see a problem with what I’m doing, or maybe someone has experienced a similar issue and found a fix?

Thanks very much :slightly_smiling_face:

Zach

Based on some further testing, this does seem to be a problem with the data sent by HubSpot on “DROPDOWN_FETCH” and “TOGGLE_FETCH” requests. The “accountId” request parameter is the same for these request types, regardless of which ‘app user’ is chosen in the account component dropdown menu. For other control component request types (e.g. “IFRAME_FETCH” and “BUTTON_UPDATE”), the “accountId” is specific to the ‘app user’ chosen in the account component dropdown menu.

@dennisedson :waving_hand: can you review, please? Thanks :slightly_smiling_face: