Hi
I am trying to write an iOS social networking app while using Elgg as the backend engine. I am quite new to elgg so forgive me if I am missing something obvious, however I am having an issue using the Elgg-Web_Services plugin.
I have installed the web_services plugin and it is also activated. I have also enabled Core functions (and everything else) in the web_services admin panel and the use of API by the site is enabled. However, when I make a call to any of the functions in the web_services plugin I get an implementation error message.
Example:
http://localhost/elgg//services/api/rest/xml/?method=site.test
results in
"Method call 'site.test' has not been implemented".
I am aware that this error suggests that the method is not exposed, however I assume that the plugin exposes its test function.
Elgg Version: 1.8.16
Is there anything else I am missing or doing wrong, which is causing this behaviour? Or perhaps there is a compability issue and the plugin simply does not work with the new version of elgg?
Best
Seb
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Paweł Sroka@srokap
Paweł Sroka - 0 likes
- Tom@Thomasondiba
Tom - 0 likes
This XML file does not appear to have any style information associated with it. The document tree is shown below. <status type="integer">0
<result type="array"> <auth.gettoken type="array"> <description type="string"> This API call lets a user obtain a user authentication token which can be used for authenticating future API calls. Pass it as the parameter auth_token
<function type="string">auth_gettoken
<parameters type="array"> <username type="array"> <type type="string">string
<required type="boolean">true
<password type="array"> <type type="string">string
<required type="boolean">true
<call_method type="string">POST
<require_api_auth type="boolean">false
<require_user_auth type="boolean">false
<system.api.list type="array"> <description type="string">List all available API calls on the system.
<function type="string">list_all_apis
<call_method type="string">GET
<require_api_auth type="boolean">false
<require_user_auth type="boolean">false
<guid type="integer">205 <name type="string">Username <avatar_url type="string"> http://www.yoursitename.com/mod/profile/icondirect.php?lastcache=1344884908&joindate=1333550144&guid=205&size=small <time_created type="integer">1359336840 <description type="string"> U.S. scientists successfully drilled into Lake Whillans, deep beneath the Antarctic ice sheet, they reported on Sunday (Jan. 27) 2013.
- SebastianK@sebastiankotur
SebastianK - 0 likes
- Tom@Thomasondiba
Tom - 0 likes
- Don G@osaru
Don G - 0 likes
- Parixit@parixit
Parixit - 0 likes
- Parixit@parixit
Parixit - 0 likes
- sumanth bala@SumanthBala
sumanth bala - 0 likes
You must log in to post replies.Try to hit the page http://localhost/elgg/services/api/rest/default?method=system.api.list from the browser and check if the method you're calling is there.
If it doesn't help, post the link to the plugin that you're using. On 1.9 branch there's core plugin with the same dir name as the community one, but does different stuff.
Hi! you need to test the Elgg-Web_services plugin with online hosted server e.g www....
1. Go to this address: https://github.com/markharding/elgg-web-services
2. Go to your http://www.yoursitename.com/admin/plugin_settings/web_services
click all this buttons to expose your functions...
Plugin Settings
Web Services
3. Second type the address bellow on the address bar and see the elgg API magic
http://www.yoursitename.com/services/api/rest/xml/?method=system.api.list
you should see this information on the screen:
4. Now type this and read your site wire post in xml LOL : http://www.yoursitename.com/services/api/rest/xml/?method=wire.get_posts&string=testing
<array_item name="9" type="array"><guid type="integer">12752 <owner type="array">
Hope this helps....
Hi
You were both right. I was using the wrong plugin as I didn't realise that there is more than one. For anyone else who may have this problem in the future.
The plugin by Mark Harding did work:
https://github.com/markharding/elgg-web-services
Meanwhile the plugin by Techyon DID NOT work:
https://github.com/Tachyon/Elgg-Web-Services
(I am not saying it is a bad plugin, it's just I couldn't get it to work)
Thanks for your help
Best
Seb
I am happy to hear that you were able to get your project moving... this is the spirit of Elgg community... unlike other social networks or communities where people look at pictures of cats and dogs monday to friday and exchange unconstructive comments, here we help one another... without corporate greed “An excessive desire to acquire or possess more money than what one needs” or lust for money...
Now take your time and be creative with the codes…
Wish you the best and always remember to give back to the community when need arises...
Thanks.
Hello. Pls somebody explain to me how to pass auth_token in webservice calls. I am writing a small app using jquery mobile. I can succesfully get the token ($.ajax({type:'POST',url:http://mysite/service/api/rest/json/',data:'method=auth.gettoken'&username=user&password=password',dataType:'json'.....}
This returns a token e.g:df123dfgg455666...
I try to pass this as a parameter when making calls like blog.save_post but it gives me error. The readme says i have to pass auth_token in every web service call. Don't know how. Pls any help would be appreciated
I am not able to make webservice calls.
Here are my call details
$url = ...../json/?method=group.forum.save_post&api_key=XXXX";
$post_data = "title=test&desc=test&groupid=XX&auth_token=$data[result]";
Initially I call auth.gettoken and get the token and directly make a call by above url and post data.
But I could not achieve to do user auth.
Please help me out.
I found the solution. That was my issue with linking the file. Not relevant to ELGG.
Hai Parxit,
Can you help me out how did you pass your auth.token by using the post method,can you define me step-to-step manner