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.

Problem when deleting forwarder via API: Failed to delete forwarder.

Discussion in 'cPanel Developers' started by fernandomm, Aug 7, 2012.

  1. fernandomm

    fernandomm Active Member

    Joined:
    Nov 25, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    When i call Cpanel API v2 with the following paramaters:

    Code:
    cpanel_jsonapi_module = Email
    cpanel_jsonapi_apiversion = 2
    cpanel_jsonapi_func = delforward
    user = myuser
    forwarder = mydomain@myaddress.com=|/home/myuser/public_html/receive.php
    It returns "Failed to delete forwarder.". I double checked the value of forwarder parameter and it seems correct. Any ideas of what i'm doing wrong?

    I can add forwarders normally, just need to delete it now :)

    Thanks.
     
  2. fernandomm

    fernandomm Active Member

    Joined:
    Nov 25, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    So, it's simply broken or what?
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. fernandomm

    fernandomm Active Member

    Joined:
    Nov 25, 2009
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Infopro,

    I saw these but they all refer to version 1 and i'm using version 2.
     
  5. charsleysa

    charsleysa Active Member

    Joined:
    Jul 18, 2011
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palmerston North, New Zealand
    cPanel Access Level:
    Root Administrator
    cPanel API version 1 and 2 co-exist. A way to think about them is that API 1 usually just gives you information and API 2 is for extra functionality. There is no "delforward" function in API 2, you must use API 1. They are interchangeable and should work with each other just fine.
     
  6. morissette

    morissette Well-Known Member

    Joined:
    May 24, 2009
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    Some Perl Codes to help you out hopefully:

    The above is just a excerpt to keep things as easy as possible.
     
Loading...

Share This Page