User/Session info upon service invocation?

When invoking a JS backend service running on the backendless servers, is there a way (in code) to figure out

  • whether the call is by an authorized user
  • which role(s)
  • the user ID

So, I’m looking for a kind of variable containing the call context.


Hi @Klaas_Klever

All this information is persisted in the invocation context.
You can see how we get it in Codeless.

  • whether the call is by an authorized user

if there is userId it means it comes from an authorized user



Is it a safe invocation context (set by your servers), or can it be manipulated by a client when invoked via REST?


it’s safe

userId - the server gets it from the passed user-token

1 Like