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 using webservice plugin for this
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.
Hello. Please can any one explain to me how to do api authentication in elgg webservice plugin
I believe you just send your API key as a query parameter 'api_key'
Sorry. I don't know how to get api_key. I downloaded the apiadmin plugin but don't know how to get a key. I have managed to get things going without api authentication. But its not cool. @Matt Thanks for your reply.
The token returned by auth.gettoken can be added it the next API calls like this:
(Edit: changed "api_key" to "auth_token")
The auth.gettoken API:
Thanks for your reply
Been off for days now.
Main problem is that i dont know how to use api admin to get api key
There's an administration page for it (maybe under utilities? can't remember offhand)
It has a straight link for generating keys
This comment was removed by a moderator because it contained advertising.
And it was developed using Elggs webservices. Many thanks to elgg. Love you guys.
- Previous
- 1
- 2
- Next
You must log in to post replies.