'user id' of 'authenticated user' in hosted API code ??

Hi -

How can I get ‘user id’ of Authenticated User (i.e. the user who invoked the API) in the hosted API code ?

The ‘user id’ field in InvocationContext seems to be encrypted - and does not correspond to ‘object id’ of "user’ object too.

2016-07-13 21:02:42,005 | com.mytest.services.MerchantServices | DEBUG | Before: InvocationContext{AbstractContext{appId=‘09667F8B-98A7-E6B9-FFEB-B2B6EE831A00’, userId=‘B440C78D-D55E-8422-FF30-100F2B694700’, userToken=‘C3DEB32D-7B4B-4498-FFFF-E040DEFB9100’, userRoles=[AuthenticatedUser], deviceType=ANDROID}}

InvocationContext.getUserId() returns the object ID of the user who made the call. You may want to double check?

Hi Aditya,
I just checked that in your app you have a user with ID B440C78D-D55E-8422-FF30-100F2B694700. Can you verify that?

Actually I meant to get value of ‘Id’ column of Users table. I am now using ‘Backendless.UserService.loggedInUser()’ function for the same.

Please close the ticket. This is fine.