Forum Discussion
You can get it using the API
https://lithosphere.lithium.com/restapi/vc/authentication/sessions/login
Here is the related doc
https://lithosphere.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=sessionauth
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?
- VikasB7 years agoBoss
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