Forge app REST API: Getting users account id

Hey everyone,

I just tried the new Forge app REST APIs and it worked quite well. However, one question came up: I need the account id of the user who is making the request in order to run some app internal permission checks.

In the information I see in the app when a request is sent, I did find a header called “x-slauth-user-context-account-id”. That seems to be the information I need. Does anybody know if that header will always be included? Or is there another location where I can get this information in the app?

Hi @ij-s,
Thanks for trying out the new Forge app REST APIs and sharing your experience. It’s great to hear they’re working well for you already.

To answer your question, yes, you can rely on the x-slauth-user-context-account-id header for getting the calling user’s account ID in your app.