Remote API Permissions - API Error 10003 - no permissions

Discussion in 'aMember Pro v.4' started by smiddleton67, Apr 4, 2013.

  1. smiddleton67

    smiddleton67 New Member

    Joined:
    Mar 28, 2013
    Messages:
    9
    I use aMember Pro ver4 and cms wordpress.
    Active api Remote API Permissions, check all option (see attached image)
    When i write a function check user login:
    http://example.com/amember/api/check-access/by-login-pass?_key=APIKEY&login=john&pass=1234
    aMember service result:

    ["message"]=> "API Error 10003 - no permissions for check-access-post API call"
    PHP:
    <?php
    $url 
    'http://YOURDOMAIN.COM/amember/
    api/check-access/by-login-pass
    '
    ;.
     
    $fields = array(
                
    '_key' => 'my_SECRETKEY',
                
    '_format' => 'xml',
                
    'login' => 'username01',
                
    'pass' => '111111111'
        
    );
     
     
    $fields_string  http_build_query($fields);
    //open connection
    $ch curl_init();
     
    //set the url, number of POST vars, POST data
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_POST,count($fields));
    curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
     
    //execute post
    $result curl_exec($ch);
     
    //close connection
    curl_close($ch);
    Please, help me!
    Thanks!

    Attached Files:

  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This controller accept GET request only, but you are trying to POST.

Share This Page