How do I add new user using Web API?

Discussion in 'aMember Pro v.4' started by cantilena, Jul 1, 2012.

  1. cantilena

    cantilena New Member

    Joined:
    Aug 20, 2011
    Messages:
    2
    I'm in the process of upgrading from aMember v3 to v4, and the upgrade script refused to import my users, so I'm adding them manually.

    Could you please tell me how to add a new user using your new Web API? I've checked your documentation, tried the examples, but I cannot get a new user added. Here's the URL I'm using (I've tried sending it directly in the browser and also using PHP Curl):

    http://www.napama.org/amemberv4/api/users?_key=#####&login=johndoe@earthlink.net&pass=password&email=johndoe@earthlink.net&name_f=John&name_l=Doe&_format=xml

    It returns a list of the users already in my database, but doesn't add the new one. Help!
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You should use HTTP POST method if you want to add user and not GET.
    Also, what is the problem with import script? Can you contact us in helpdesk with this issue?
  3. cantilena

    cantilena New Member

    Joined:
    Aug 20, 2011
    Messages:
    2
    Thanks for the reply, Alexander. I don't remember the error message I got with the import script. It copied over my products, but no payments and only one user before halting with an error. I ended up importing my users and payments from my old aMember v3 database using CSV import.

    Can you please give me an example of a URL or HTML form that would use HTTP POST to add a user to the database? I'm not sure what I'm doing wrong. Thanks!

Share This Page