Pulling data from elgg using user authentication and api key

Well, I am trying to write an iphone app for the elgg. So far I have able to successfully login to the elgg and get the a user tokken using auth_gotten method in the api. I have also registered my app for the elgg and got private and public keys. 

Now, I want to retrieve data from the elgg database using the token and api keys. I have read http://docs.elgg.org/wiki/Web_Services but I hardly understand what I have to do for this kind of operation. It says I can use  send_api_post_call(), but I couldnt find any example how to use this function in order to pull data from elgg. For instance, I want to retrieve the profile pic of an specific user. 

Please help me to find a way to do it as I got stuck on this problem for several days!




  • send_api_post_call() is more there for testing than anything else. If you have never done web services before I would:

    • expose a single function as a web services method and get it working without any authentication from a web browser
    • start calling the method from a client application on your computer (PHP cli, Python, Java, etc). You can take a look at the client libraries put together for Flickr or Twitter for an idea of how to build a simple client
    • add authentication - first API and then user
    • move to the iPhone
    • build out your web services API and the client application
  • Hi Cash,


    Thanks for your response.

    Actually, I have been able to pull data from the elgg with the API authentication. I could successfully retrieve user profile pic to my iphone app using api authentication.

    My problem now is how to use user authentication as well in order to retrieve data. I couldnt find any sample code for elgg so far which can show me a general view how to do it.