duplicate
To log in as another user, use the core/duplicate method. It duplicates the active session.
Endpoint
svc=core/duplicate¶ms={
"operateAs": "<text>",
"continueCurrentSession": <bool>,
"appName": "<text>",
"checkService": "<text>"
}
Parameters
| Parameter | Description |
|---|---|
operateAs |
The name of the user on whose behalf you want to log in to the system. You must have the Act on behalf of this user access right to this user. The parameter should be empty if you want to log in as the main user. |
continueCurrentSession |
The parameter defines whether the previous session should be continued. Possible values:
|
appName |
Name of the app for the new session. The name is written to the server logs. Optional. If the parameter isn’t specified, the app name of the current session is used. |
checkService |
An optional possibility to validate the billing service of the current user. |
To get information about the current session without generating a new session, use the core/duplicate method with the following parameter:
svc=core/duplicate¶ms={"restore":1}
Response
The response format is the same as for the token/login method.
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 1 | Invalid session. |
| 7 | Access denied due to the billing rules (only for the checkService parameter). |
| 8 | Failed to fetch the subordinate user (the operateAs parameter), you have no Act on behalf of this user access right to this user, or failed to set the token access rights for the new session. |
| 1003 | No session. |