Cannot overwrite account on Remote Root Account Transfer

pedrovnascimento

Registered
Apr 6, 2020
2
0
1
Brazil
cPanel Access Level
Root Administrator
Hello There,


Im trying to transfer accounts using PHP and WHM API 1 Functions:

enqueue_transfer_item


Although I implemented every overwrite option for the module AccountRemoteRoot, when I review the completed session, I get the error saying that the user already exists:

1586175168756.png

I want to be able to overwrite through the API, the same way I can by the checkbox "Overwrite" on the WHM Transfer Tool functionality.
The parameters I'm using when calling the API:

PHP:
$settings = array(
         'api.version'=> '1',
         'transfer_session_id' => $this->transferSessionId,
         'module'=>'AccountRemoteRoot',
         'user' => $this->accountUsername,
         'localuser' => $this->accountUsername,
         'detected_remote_user' => $this->accountUsername,
         'domain' => $this->accountDomain,
         'replaceip' => 'all',
         'xferpoint' => '1',
         'overwrite_sameowner_dbs' => '1' ,
         'overwrite_sameowner_dbusers' => '1' ,
         'skiphomedir' => '0' ,
         'skipacctdb' => '0' ,
         'force' => '1' ,
         'skipaccount' => '0' ,
         'overwrite_with_delete' => '1' ,
        );
How can I force an overwrite?

Thank you.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
Are either of the following true as you're unable to use the force flag in the following settings:

  • You called the WHM API 1 create_remote_root_transfer_session function with the unrestricted_restore parameter set to 1.
  • The localuser parameter does not match the user parameter.

I also want to note that if you're not using v88 this parameter most likely won't be recognized:
overwrite_with_delete


Note:


  • Only use this parameter for the AccountRemoteRoot and AccountRemoteUser modules.
  • We added this parameter in cPanel & WHM version 88.
 

pedrovnascimento

Registered
Apr 6, 2020
2
0
1
Brazil
cPanel Access Level
Root Administrator
Are either of the following true as you're unable to use the force flag in the following settings:

  • You called the WHM API 1 create_remote_root_transfer_session function with the unrestricted_restore parameter set to 1.
  • The localuser parameter does not match the user parameter.

I also want to note that if you're not using v88 this parameter most likely won't be recognized:
overwrite_with_delete
I'm sure I set create_remote_root_transfer_session right.


overwrite_with_delete returns a error. How can I force the use of v88 ? Not sure how to set this.

Thank you for replying.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,250
313
Houston
You'd have to set the server to use EDGE - which really isn't recommended for production but if you want to set it you can do so at WHM>>Server Configuration>>Update Preferences