setImpersonateUserId method
Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
Implementation
@override
ClientBrowser setImpersonateUserId(value) {
config['impersonateUserId'] = value;
addHeader('X-Appwrite-Impersonate-User-Id', value);
return this;
}