How to login and access protected resources from Ajax

Discussion in 'aMember Pro v.4' started by rickbraddyllc, Jan 30, 2013.

  1. rickbraddyllc

    rickbraddyllc New Member

    Joined:
    Jan 27, 2009
    Messages:
    20
    I need to log into AMember using Ajax scripting, then run a 2nd Ajax request to a PHP program that's running in a folder protected by AMember.

    A few questions:

    1. Is there an Ajax or JavaScript API available enabling login to a remote AMember, then access to a protected folder file; e.g. PHP.?

    2. I have tried emulating what the browser/user would do, by issuing a POST request via Ajax from the browser to https://www.mysite.com/amember/login, passing the amember_login and amember_pass, but I don't see a response. Is this the correct URL to post to for login?

    3. Once logged in, how would I maintain the authenticated session information from the login to the 2nd Ajax request, which would be to call https://www.mysite.com/myfolder/myapp.php?

    Any guidance or assistance would be greatly helpful.

    Rick

Share This Page