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.

Regards,

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

Regards,
Vlad

Great!
Thanks

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

Regards

it’s safe

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

1 Like