[Owncloud] Share API with APP framework

Bernhard Posselt dev at bernhard-posselt.com
Fri Sep 6 12:17:47 UTC 2013


The request token is sent automatically for each jquery request, see
core/js/oc-requesttoken.js so no need to send it by yourself if you use
jquery. If you use something else you need to send the global variable
oc_requesttoken as header "requesttoken" for each request that checks
the CSRF token.

On 09/06/2013 12:12 PM, Kropf Johannes wrote:
> Dear Owncloud experts,
>
> I wanna use the Share API in my own app which is based on the App Framework approach.
>
> When the shared API does its AJAX request wthen calling "getItems" I get an error "No token found".
> In the ajax request in JS it seems that there is no requesttoken submitted:
>
> $.ajax({type: 'GET', url: OC.filePath('core', 'ajax', 'share.php'), data: { fetch: 'getItem', itemType: itemType, itemSource: itemSource, checkReshare: checkReshare, checkShares: checkShares }, async: false, success: function(result) { ....
>
>
> How should that work? How can I set the requesttoken for the share api?
>
> Unfortunately there is nothing written in the doc about that issue.
>
> Kind regards,
>
> Johannes
>
>
>
>
> JOHANNES KROPF
> Health & Environment Department
> Biomedical Systems
>
> AIT Austrian Institute of Technology GmbH
> Viktor Kaplan Straße 2  |  2700 Wiener Neustadt  |  Austria
> T +43(0) 50550-4845  |  M +43(0) 664 235 1732  |  F +43(0) 50550-4803
> johannes.kropf at ait.ac.at<mailto:johannes.kropf at ait.ac.at> |  http://www.ait.ac.at
>
> FN: 115980 i HG Wien  |  UID: ATU14703506
> www.ait.ac.at/Email-Disclaimer<http://www.ait.ac.at/Email-Disclaimer> <http://www.ait.ac.at/Email-Disclaimer>
>
>
>
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud




More information about the Owncloud mailing list