Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WHM API 1 Functions - modifyacct not updating the account

Discussion in 'cPanel Developers' started by Inic_dev, Mar 15, 2017.

Tags:
  1. Inic_dev

    Inic_dev Registered

    Joined:
    Mar 15, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Reseller Owner
    When I use the WHM API function modifyacct and pass the following URL to the server as per the documentation, it does not modify the target account.
    Code:
    URL: https://****.*****.com.br:2087/cpsess*******/xml-api/modifyacct?api.version=1&user=tran3228&owner=********&quota=5000&bwlimit=5000&maxftp=5&maxpop=3&maxlst=3&maxsql=3&maxsub=3&maxaddon=3&maxpark=3
    
    I get the following response:
    Code:
    <result>
        <metadata>
            <version>1</version>
            <reason>Account Modified</reason>
            <output>
                <messages>Running premodifyacct hook.</messages>
                <messages>/usr/local/installatron/installatron --edit --id=':all' --replace-domain='transferfrom.com='</messages>
                <messages>Running postmodifyacct hook.</messages>
            </output>
            <command>modifyacct</command>
            <result>1</result>
        </metadata>
        <data>
            <domain>transferfrom.com</domain>
            <setshell>unmodified</setshell>
            <cpuser>
                <STARTDATE>1489209594</STARTDATE>
                <OWNER>azulaowf</OWNER>
                <BWLIMIT>5242880000000000</BWLIMIT>
                <notify_account_authn_link></notify_account_authn_link>
                <PLAN>default</PLAN>
                <notify_account_authn_link_notification_disabled></notify_account_authn_link_notification_disabled>
                <MXCHECK-transferfrom.com>0</MXCHECK-transferfrom.com>
                <MAXADDON>5</MAXADDON>
                <notify_password_change></notify_password_change>
                <DOMAIN>transferfrom.com</DOMAIN>
                <USER>tran3228</USER>
                <IP>189.91.32.60</IP>
                <MAXPOP>5</MAXPOP>
                <BACKUP>0</BACKUP>
                <MAXPARK>5</MAXPARK>
                <__CACHE_DATA_VERSION>0.6</__CACHE_DATA_VERSION>
                <FEATURELIST>default</FEATURELIST>
                <LEGACY_BACKUP>0</LEGACY_BACKUP>
                <DISK_BLOCK_LIMIT>512000000000</DISK_BLOCK_LIMIT>
                <notify_email_quota_limit></notify_email_quota_limit>
                <notify_password_change_notification_disabled></notify_password_change_notification_disabled>
                <HASCGI>1</HASCGI>
                <notify_contact_address_change_notification_disabled></notify_contact_address_change_notification_disabled>
                <notify_disk_limit></notify_disk_limit>
                <MAXSQL>5</MAXSQL>
                <notify_account_login_for_known_netblock></notify_account_login_for_known_netblock>
                <MAX_DEFER_FAIL_PERCENTAGE>unlimited</MAX_DEFER_FAIL_PERCENTAGE>
                <DBOWNER>tran3228</DBOWNER>
                <DEMO>0</DEMO>
                <RS>paper_lantern</RS>
                <HASDKIM>1</HASDKIM>
                <HASSPF>0</HASSPF>
                <MAX_EMAIL_PER_HOUR>unlimited</MAX_EMAIL_PER_HOUR>
                <LANG>english-utf8</LANG>
                <MTIME>1489558844</MTIME>
                <MAILBOX_FORMAT>maildir</MAILBOX_FORMAT>
                <MAXSUB>5</MAXSUB>
                <notify_contact_address_change></notify_contact_address_change>
                <notify_account_login_notification_disabled></notify_account_login_notification_disabled>
                <LOCALE>en</LOCALE>
                <notify_account_login></notify_account_login>
                <_PACKAGE_EXTENSIONS></_PACKAGE_EXTENSIONS>
                <CONTACTEMAIL2></CONTACTEMAIL2>
                <PUSHBULLET_ACCESS_TOKEN></PUSHBULLET_ACCESS_TOKEN>
                <MAXLST>5</MAXLST>
                <CONTACTEMAIL>wfree@webcenter.br</CONTACTEMAIL>
                <MAXFTP>3</MAXFTP>
            </cpuser>
            <user>tran3228</user>
        </data>
    </result>
    <!-- Web Host Manager 11.62.0.16 (c) cPanel, Inc. 2015 cPanel Inc. | The Hosting Platform of Choice  Unauthorized copying is prohibited. -->
    
    As you can see in the response, it does not update anything and gives back the existing system values.

    I've tries using "GET" & "POST" method but still does not help at all.
     
    #1 Inic_dev, Mar 15, 2017
    Last edited by a moderator: Mar 15, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You will need to ensure you use capital letters for the parameters (other than the "user" and "owner" parameters). For example, you are entering:

    maxpop

    This should be:

    MAXPOP

    This will ensure it matches the documented parameters at:

    WHM API 1 Functions - modifyacct - Software Development Kit - cPanel Documentation

    Thank you.
     
Loading...

Share This Page