Forum Discussion
Hi VikasB
Thanks for the reply. Yes I tried using that too.
So when I make a rest call within a component and pass the logged in user's login as the query param, it throws error saying "cannot switch to yourself"
If I don't pass the user.login query param, it says authentication failed
How can I go about this?
You do not need to pass the login details. See here, it works fine in the component.
- kavithams7 years agoGuide
Oh. I'm doing the exact same thing but getting an error. Please see below ( both with "?url" and without too )
- Parshant7 years agoBoss
If you are using SSO in community, you need to login first and then use the call: http://community_url.com/restapi/vc/authentication/sessions/current/id
If you're not using SSO on the community, you can login using: http://community_url.com/restapi/vc/authentication/sessions/login?user.login=username&user.password=password
- kavithams7 years agoGuide
Okay, so I'm using the first call "/authentication/sessions/current/id" one and I get a token but that is not the same as the session Key looks like.
For example : I got this as the output : 9EC147CAC5F9F2DDA2C21A7F6521D0FB and this is not the same as the session key functionally too.
Kindly advise how to go about ?