Forum Discussion
- SuzieHKhoros Alumni (Retired)
Hi raguv12ps.
This sounds like something you could do using an account with the Switch to another user permission and Session Key login with the Community REST API v1. I've not tried this in the scenario you're working with though.
We have an example of this in our Create subscriptions for another user guide in the Dev Doc Portal. The create subscription part won't apply, the steps to get the required session keys should.
The basic steps would be something like:
- Create a session key for yourself using a Community account with the Switch to another user permission.
- Create a second session key for the "common user" using your retrieved session key.
- With the common user's session key, perform the desired action.
Thanks SuzieH
I'll give this a try and see if it works.- phoneboyDirector
I'm thinking about how to do something similar to "sandbox" Switch User functionality, namely to prevent them switching to an Admin user.
That would imply doing this in a component, so not sure the flow mentioned in that article is something I can actually accomplish.
Does the actual "switch user" action have an endpoint we can call via a restadmin call or similar?