API error response 3

Options
I'm using LuminateExtend, and everything's working fine with simple calls to cons or teamraiser. But when I try a request for group info...

  

function myLoginTestCallback(data){ console.log(data); }
luminateExtend.api.request([{
api: 'group',
data: 'method=getGroupMembers&group_id=67041',
requiresAuth: true,
callback: myLoginTestCallback,
}]);

.... I keep getting a "You are not authorized to access this page" error response.


Anyone know what I'm doing wrong here? I thought that requireAuth: true is supposed to take care of the permissions?  Besides that, I've got the group set to be publically viewable, so I wouldn't expect it to care either way. And, I'm testing it on our LO server, so it isn't a whitelist issue.


Ultimately, I'm running a "speak out" campaign, and trying to get a list of everyone who filled out a certain survey (basically, an off-site version of S450).


Thoughts?
Tagged:

Comments

  • Jeremy Reynolds:

    I'm using LuminateExtend, and everything's working fine with simple calls to cons or teamraiser. But when I try a request for group info...

      


    function myLoginTestCallback(data){ console.log(data); }
    luminateExtend.api.request([{
    api: 'group',
    data: 'method=getGroupMembers&group_id=67041',
    requiresAuth: true,
    callback: myLoginTestCallback,
    }]);

    .... I keep getting a "You are not authorized to access this page" error response.


    Anyone know what I'm doing wrong here? I thought that requireAuth: true is supposed to take care of the permissions?  Besides that, I've got the group set to be publically viewable, so I wouldn't expect it to care either way. And, I'm testing it on our LO server, so it isn't a whitelist issue.


    Ultimately, I'm running a "speak out" campaign, and trying to get a list of everyone who filled out a certain survey (basically, an off-site version of S450).


    Thoughts?

     

    getGroupMembers can only be called server-side, or, client-side in the context of a logged in administrator. To use it on a user-facing page, you'd need to write some server-side code. I'd note, however, a number of limitations of this method. First, the data it returns is cached. Second, the method can return a maximum of 1,000 members. For this sort of thing, I'd recommend using the Web Services API Query operation, which doesn't have the same limitations. Of course, this will also require writing server-side code.

  • Noah Cooper:

    getGroupMembers can only be called server-side, or, client-side in the context of a logged in administrator. To use it on a user-facing page, you'd need to write some server-side code. I'd note, however, a number of limitations of this method. First, the data it returns is cached. Second, the method can return a maximum of 1,000 members. For this sort of thing, I'd recommend using the Web Services API Query operation, which doesn't have the same limitations. Of course, this will also require writing server-side code.

     

    Thank you SO much!


    Would there be those kinds of limits if I made a "Roll Your Own API" method? Something like:

     

    [[U8:text/javascript]][[?xx::x[[S334:callback]]x::::[[S334:callback]](]]{"results": "[[T6:[[E450:[[S334:gID]]:members]]]]"}[[?xx::x[[S334:callback]]x::::)]]]]

  • You could do that. The only thing, though, is that S450 has the same limitations as getGroupMembers (the results are cached, and the list is limited to 500).

Categories